IAPing.
This commit is contained in:
@@ -21,7 +21,9 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>126</string>
|
||||
<string>135</string>
|
||||
<key>CFBundleIconName</key>
|
||||
<string>AppIcon</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>8.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
@@ -56,20 +58,6 @@
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>CFBundleIcons</key>
|
||||
<dict>
|
||||
<key>CFBundlePrimaryIcon</key>
|
||||
<dict>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>iTunesArtwork</string>
|
||||
<string>Icon</string>
|
||||
<string>Icon-60</string>
|
||||
<string>Icon-76</string>
|
||||
<string>Icon-83.5</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>ITSAppUsesNonExemptEncryption</key><false/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
(defproject advent "advent-2.0.4"
|
||||
(def version (str "2.0." (clojure.string/trim-newline (slurp "../desktop/last-release")) "-snapshot"))
|
||||
(defproject advent version
|
||||
:description "FIXME: write description"
|
||||
:dependencies [[com.badlogicgames.gdx/gdx "1.9.4"]
|
||||
[com.badlogicgames.gdx/gdx-backend-robovm "1.9.4"]
|
||||
@@ -10,12 +11,13 @@
|
||||
[com.mobidevelop.robovm/robovm-rt "2.3.0"]
|
||||
[play-clj "0.4.6-BRYCE" :exclusions [com.badlogicgames.gdx/gdx-box2d com.badlogicgames.gdx/gdx-bullet]]]
|
||||
:source-paths ["src/clojure" "../desktop/src-common"]
|
||||
|
||||
:java-source-paths ["src/java"]
|
||||
:plugins [[lein-fruit "0.2.4-SNAPSHOT"]
|
||||
[org.skummet/lein-skummet "0.2.2"]
|
||||
]
|
||||
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
|
||||
:jvm-opts ["-Dno-steam=true" "-Dclojure.compiler.direct-linking=true" "-Dclojure.compiler.elide-meta=[:doc :file :line :added]"]
|
||||
:jvm-opts ["-Dno-steam=true" "-Dclojure.compiler.direct-linking=true" "-Dclojure.compiler.elide-meta=[:doc :file :line :added]"
|
||||
"-Dplatform=ios"]
|
||||
:ios {:robovm-opts ["-config" "robovm.xml"]
|
||||
:robovm-path "/Users/brycecovert/.robovm-sdks/robovm-2.3.0"
|
||||
:version 2.1}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 26 KiB |
@@ -27,6 +27,8 @@
|
||||
</resource>
|
||||
</resources>
|
||||
<forceLinkClasses>
|
||||
|
||||
<pattern>org.robovm.apple.storekit.**</pattern>
|
||||
<pattern>advent.**</pattern>
|
||||
<pattern>clojure.genclass*</pattern>
|
||||
<pattern>clojure.gvec*</pattern>
|
||||
@@ -98,5 +100,6 @@
|
||||
<framework>OpenAL</framework>
|
||||
<framework>AudioToolbox</framework>
|
||||
<framework>AVFoundation</framework>
|
||||
<framework>StoreKit</framework>
|
||||
</frameworks>
|
||||
</config>
|
||||
|
||||
@@ -1,18 +1,35 @@
|
||||
package advent.core;
|
||||
|
||||
import java.util.*;
|
||||
import clojure.lang.RT;
|
||||
import clojure.lang.Symbol;
|
||||
// import advent.ios.*;
|
||||
|
||||
import com.badlogic.gdx.*;
|
||||
import com.badlogic.gdx.backends.iosrobovm.*;
|
||||
|
||||
import org.robovm.apple.foundation.*;
|
||||
import org.robovm.apple.uikit.UIApplication;
|
||||
import org.robovm.apple.uikit.*;
|
||||
import org.robovm.apple.glkit.GLKViewDrawableColorFormat;
|
||||
import org.robovm.apple.glkit.GLKViewDrawableDepthFormat;
|
||||
import org.robovm.apple.storekit.*;
|
||||
|
||||
public class IOSLauncher extends IOSApplication.Delegate {
|
||||
protected IOSApplication createApplication() {
|
||||
TransactionObserver transactionObserver;
|
||||
@Override
|
||||
public boolean didFinishLaunching (UIApplication application, UIApplicationLaunchOptions launchOptions) {
|
||||
transactionObserver = new TransactionObserver();
|
||||
SKPaymentQueue.getDefaultQueue().addTransactionObserver(transactionObserver);
|
||||
return super.didFinishLaunching(application, launchOptions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void willTerminate(UIApplication application) {
|
||||
SKPaymentQueue.getDefaultQueue().removeTransactionObserver(transactionObserver);
|
||||
super.willTerminate(application);
|
||||
}
|
||||
|
||||
protected IOSApplication createApplication() {
|
||||
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
|
||||
// config.colorFormat = GLKViewDrawableColorFormat.SRGBA8888;
|
||||
// config.depthFormat = GLKViewDrawableDepthFormat._24;
|
||||
@@ -22,8 +39,14 @@ public class IOSLauncher extends IOSApplication.Delegate {
|
||||
config.useAccelerometer=false;
|
||||
config.useCompass=false;
|
||||
System.out.println("application created.");
|
||||
HashSet<String> products = new HashSet();
|
||||
products.add("fullgame");
|
||||
SKProductsRequest request = new SKProductsRequest(products);
|
||||
request.setDelegate(new ProductDelegate());
|
||||
request.start();
|
||||
|
||||
RT.var("clojure.core", "require").invoke(Symbol.intern("advent.core"));
|
||||
RT.var("clojure.core", "require").invoke(Symbol.intern("advent.ios"));
|
||||
System.out.println("clojure loaded");
|
||||
try {
|
||||
NSDictionary infoDictionary = NSBundle.getMainBundle().getInfoDictionary();
|
||||
|
||||
Reference in New Issue
Block a user