[add] FCM
This commit is contained in:
parent
4ed7cf8119
commit
c74d8648fd
@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CLIENT_ID</key>
|
||||||
|
<string>407474781989-oj00t4rdam3scpnaoohm2dii1c7tti5c.apps.googleusercontent.com</string>
|
||||||
|
<key>REVERSED_CLIENT_ID</key>
|
||||||
|
<string>com.googleusercontent.apps.407474781989-oj00t4rdam3scpnaoohm2dii1c7tti5c</string>
|
||||||
|
<key>API_KEY</key>
|
||||||
|
<string>AIzaSyBwhNhVYqErLAwU5SMmkDiN6NOVrhpykOQ</string>
|
||||||
|
<key>GCM_SENDER_ID</key>
|
||||||
|
<string>407474781989</string>
|
||||||
|
<key>PLIST_VERSION</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>BUNDLE_ID</key>
|
||||||
|
<string>org.jianmiau.jmka</string>
|
||||||
|
<key>PROJECT_ID</key>
|
||||||
|
<string>jmka-baa31</string>
|
||||||
|
<key>STORAGE_BUCKET</key>
|
||||||
|
<string>jmka-baa31.appspot.com</string>
|
||||||
|
<key>IS_ADS_ENABLED</key>
|
||||||
|
<false></false>
|
||||||
|
<key>IS_ANALYTICS_ENABLED</key>
|
||||||
|
<false></false>
|
||||||
|
<key>IS_APPINVITE_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>IS_GCM_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>IS_SIGNIN_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>GOOGLE_APP_ID</key>
|
||||||
|
<string>1:407474781989:ios:0bcba35c2e54c67a25a4cc</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>aps-environment</key>
|
||||||
|
<string>development</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -3,7 +3,7 @@
|
|||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
classes = {
|
classes = {
|
||||||
};
|
};
|
||||||
objectVersion = 46;
|
objectVersion = 52;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
@ -81,6 +81,11 @@
|
|||||||
FE7A3B0128641588008DDC0D /* Sound_S.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE7A3B0028641588008DDC0D /* Sound_S.swift */; };
|
FE7A3B0128641588008DDC0D /* Sound_S.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE7A3B0028641588008DDC0D /* Sound_S.swift */; };
|
||||||
FEBFDF542864382300EF0BF8 /* Kirby01.wav in Resources */ = {isa = PBXBuildFile; fileRef = FEBFDF522864382300EF0BF8 /* Kirby01.wav */; };
|
FEBFDF542864382300EF0BF8 /* Kirby01.wav in Resources */ = {isa = PBXBuildFile; fileRef = FEBFDF522864382300EF0BF8 /* Kirby01.wav */; };
|
||||||
FEBFDF552864382300EF0BF8 /* Kirby02.wav in Resources */ = {isa = PBXBuildFile; fileRef = FEBFDF532864382300EF0BF8 /* Kirby02.wav */; };
|
FEBFDF552864382300EF0BF8 /* Kirby02.wav in Resources */ = {isa = PBXBuildFile; fileRef = FEBFDF532864382300EF0BF8 /* Kirby02.wav */; };
|
||||||
|
FEC511AD28B894CF00ED3051 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = FEC511AC28B894CE00ED3051 /* GoogleService-Info.plist */; };
|
||||||
|
FEC511B028B8972800ED3051 /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = FEC511AF28B8972800ED3051 /* FirebaseAnalytics */; };
|
||||||
|
FEC511B228B8972800ED3051 /* FirebaseMessaging in Frameworks */ = {isa = PBXBuildFile; productRef = FEC511B128B8972800ED3051 /* FirebaseMessaging */; };
|
||||||
|
FEC511B528B8977400ED3051 /* Firebase_S.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEC511B428B8977400ED3051 /* Firebase_S.swift */; };
|
||||||
|
FEC511BA28B8A75000ED3051 /* Firebase_OC.m in Sources */ = {isa = PBXBuildFile; fileRef = FEC511B928B8A75000ED3051 /* Firebase_OC.m */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
@ -196,6 +201,11 @@
|
|||||||
FE7A3B0028641588008DDC0D /* Sound_S.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Sound_S.swift; path = ios/Sound_S.swift; sourceTree = "<group>"; };
|
FE7A3B0028641588008DDC0D /* Sound_S.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Sound_S.swift; path = ios/Sound_S.swift; sourceTree = "<group>"; };
|
||||||
FEBFDF522864382300EF0BF8 /* Kirby01.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = Kirby01.wav; sourceTree = "<group>"; };
|
FEBFDF522864382300EF0BF8 /* Kirby01.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = Kirby01.wav; sourceTree = "<group>"; };
|
||||||
FEBFDF532864382300EF0BF8 /* Kirby02.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = Kirby02.wav; sourceTree = "<group>"; };
|
FEBFDF532864382300EF0BF8 /* Kirby02.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = Kirby02.wav; sourceTree = "<group>"; };
|
||||||
|
FEC511AC28B894CE00ED3051 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../../../../build-templates/jsb-default/frameworks/runtime-src/proj.ios_mac/GoogleService-Info.plist"; sourceTree = "<group>"; };
|
||||||
|
FEC511B328B8974500ED3051 /* JMKA-mobile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "JMKA-mobile.entitlements"; sourceTree = "<group>"; };
|
||||||
|
FEC511B428B8977400ED3051 /* Firebase_S.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Firebase_S.swift; path = ios/Firebase_S.swift; sourceTree = "<group>"; };
|
||||||
|
FEC511B828B8A75000ED3051 /* Firebase_OC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Firebase_OC.h; path = ios/Firebase_OC.h; sourceTree = "<group>"; };
|
||||||
|
FEC511B928B8A75000ED3051 /* Firebase_OC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Firebase_OC.m; path = ios/Firebase_OC.m; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@ -246,7 +256,9 @@
|
|||||||
BA3A85EC1A724AE900924D24 /* Security.framework in Frameworks */,
|
BA3A85EC1A724AE900924D24 /* Security.framework in Frameworks */,
|
||||||
1A676839180E9C1E0076BC67 /* libcocos2d iOS.a in Frameworks */,
|
1A676839180E9C1E0076BC67 /* libcocos2d iOS.a in Frameworks */,
|
||||||
D6B061241803AB9F0077942B /* CoreMotion.framework in Frameworks */,
|
D6B061241803AB9F0077942B /* CoreMotion.framework in Frameworks */,
|
||||||
|
FEC511B228B8972800ED3051 /* FirebaseMessaging in Frameworks */,
|
||||||
1A82F5FB169AC92500C4B13A /* libsqlite3.dylib in Frameworks */,
|
1A82F5FB169AC92500C4B13A /* libsqlite3.dylib in Frameworks */,
|
||||||
|
FEC511B028B8972800ED3051 /* FirebaseAnalytics in Frameworks */,
|
||||||
D454520C156E22BD00887EB5 /* libz.dylib in Frameworks */,
|
D454520C156E22BD00887EB5 /* libz.dylib in Frameworks */,
|
||||||
A92275421517C094001B78AA /* QuartzCore.framework in Frameworks */,
|
A92275421517C094001B78AA /* QuartzCore.framework in Frameworks */,
|
||||||
A92275441517C094001B78AA /* OpenGLES.framework in Frameworks */,
|
A92275441517C094001B78AA /* OpenGLES.framework in Frameworks */,
|
||||||
@ -309,6 +321,7 @@
|
|||||||
A92275321517C094001B78AA = {
|
A92275321517C094001B78AA = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
FEC511B328B8974500ED3051 /* JMKA-mobile.entitlements */,
|
||||||
FE7A3AFA286413DF008DDC0D /* Sound */,
|
FE7A3AFA286413DF008DDC0D /* Sound */,
|
||||||
288D4372225B43BE0075FBAB /* assets */,
|
288D4372225B43BE0075FBAB /* assets */,
|
||||||
1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */,
|
1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */,
|
||||||
@ -385,6 +398,7 @@
|
|||||||
22CC756321BA527F00FBF2F7 /* service */,
|
22CC756321BA527F00FBF2F7 /* service */,
|
||||||
1AFFCD841F7A5DCD00628F2C /* Images.xcassets */,
|
1AFFCD841F7A5DCD00628F2C /* Images.xcassets */,
|
||||||
40CEC424212BDAB0004BCE66 /* LaunchScreen.storyboard */,
|
40CEC424212BDAB0004BCE66 /* LaunchScreen.storyboard */,
|
||||||
|
FEC511AC28B894CE00ED3051 /* GoogleService-Info.plist */,
|
||||||
1AFFCD831F7A5DCD00628F2C /* LaunchScreenBackground.png */,
|
1AFFCD831F7A5DCD00628F2C /* LaunchScreenBackground.png */,
|
||||||
509D4AAB17EBB2AB00697056 /* AppController.h */,
|
509D4AAB17EBB2AB00697056 /* AppController.h */,
|
||||||
509D4AAC17EBB2AB00697056 /* AppController.mm */,
|
509D4AAC17EBB2AB00697056 /* AppController.mm */,
|
||||||
@ -398,6 +412,9 @@
|
|||||||
FE7A3B0028641588008DDC0D /* Sound_S.swift */,
|
FE7A3B0028641588008DDC0D /* Sound_S.swift */,
|
||||||
FE7A3AFF28641588008DDC0D /* JMKA_mobile-Bridging-Header.h */,
|
FE7A3AFF28641588008DDC0D /* JMKA_mobile-Bridging-Header.h */,
|
||||||
FE50BD3F28B740C300F0E114 /* TTS_S.swift */,
|
FE50BD3F28B740C300F0E114 /* TTS_S.swift */,
|
||||||
|
FEC511B428B8977400ED3051 /* Firebase_S.swift */,
|
||||||
|
FEC511B828B8A75000ED3051 /* Firebase_OC.h */,
|
||||||
|
FEC511B928B8A75000ED3051 /* Firebase_OC.m */,
|
||||||
);
|
);
|
||||||
name = ios;
|
name = ios;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -459,6 +476,10 @@
|
|||||||
1A67682F180E9C110076BC67 /* PBXTargetDependency */,
|
1A67682F180E9C110076BC67 /* PBXTargetDependency */,
|
||||||
);
|
);
|
||||||
name = "JMKA-mobile";
|
name = "JMKA-mobile";
|
||||||
|
packageProductDependencies = (
|
||||||
|
FEC511AF28B8972800ED3051 /* FirebaseAnalytics */,
|
||||||
|
FEC511B128B8972800ED3051 /* FirebaseMessaging */,
|
||||||
|
);
|
||||||
productName = JMKA;
|
productName = JMKA;
|
||||||
productReference = A922753D1517C094001B78AA /* JMKA-mobile.app */;
|
productReference = A922753D1517C094001B78AA /* JMKA-mobile.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
@ -488,6 +509,9 @@
|
|||||||
"zh-Hans",
|
"zh-Hans",
|
||||||
);
|
);
|
||||||
mainGroup = A92275321517C094001B78AA;
|
mainGroup = A92275321517C094001B78AA;
|
||||||
|
packageReferences = (
|
||||||
|
FEC511AE28B8972800ED3051 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
|
||||||
|
);
|
||||||
productRefGroup = A922753E1517C094001B78AA /* Products */;
|
productRefGroup = A922753E1517C094001B78AA /* Products */;
|
||||||
projectDirPath = "";
|
projectDirPath = "";
|
||||||
projectReferences = (
|
projectReferences = (
|
||||||
@ -544,6 +568,7 @@
|
|||||||
FEBFDF552864382300EF0BF8 /* Kirby02.wav in Resources */,
|
FEBFDF552864382300EF0BF8 /* Kirby02.wav in Resources */,
|
||||||
1AFFCD871F7A5DCF00628F2C /* LaunchScreenBackground.png in Resources */,
|
1AFFCD871F7A5DCF00628F2C /* LaunchScreenBackground.png in Resources */,
|
||||||
1AE159EC18C9DF3600FCA372 /* project.json in Resources */,
|
1AE159EC18C9DF3600FCA372 /* project.json in Resources */,
|
||||||
|
FEC511AD28B894CF00ED3051 /* GoogleService-Info.plist in Resources */,
|
||||||
1AD7E0A818C9DB93004817A6 /* main.js in Resources */,
|
1AD7E0A818C9DB93004817A6 /* main.js in Resources */,
|
||||||
40CEC429212BDB03004BCE66 /* Localizable.strings in Resources */,
|
40CEC429212BDB03004BCE66 /* Localizable.strings in Resources */,
|
||||||
1AFFCD851F7A5DCF00628F2C /* Images.xcassets in Resources */,
|
1AFFCD851F7A5DCF00628F2C /* Images.xcassets in Resources */,
|
||||||
@ -570,6 +595,7 @@
|
|||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
FEC511BA28B8A75000ED3051 /* Firebase_OC.m in Sources */,
|
||||||
FE7A3B0128641588008DDC0D /* Sound_S.swift in Sources */,
|
FE7A3B0128641588008DDC0D /* Sound_S.swift in Sources */,
|
||||||
509D4AC917EBB2AB00697056 /* RootViewController.mm in Sources */,
|
509D4AC917EBB2AB00697056 /* RootViewController.mm in Sources */,
|
||||||
D4545227156E28EF00887EB5 /* AppDelegate.cpp in Sources */,
|
D4545227156E28EF00887EB5 /* AppDelegate.cpp in Sources */,
|
||||||
@ -577,6 +603,7 @@
|
|||||||
22CC756521BA528000FBF2F7 /* SDKWrapper.m in Sources */,
|
22CC756521BA528000FBF2F7 /* SDKWrapper.m in Sources */,
|
||||||
509D4AC817EBB2AB00697056 /* main.m in Sources */,
|
509D4AC817EBB2AB00697056 /* main.m in Sources */,
|
||||||
4D3EB2581F8F4A6C007DA644 /* jsb_module_register.cpp in Sources */,
|
4D3EB2581F8F4A6C007DA644 /* jsb_module_register.cpp in Sources */,
|
||||||
|
FEC511B528B8977400ED3051 /* Firebase_S.swift in Sources */,
|
||||||
509D4ABC17EBB2AB00697056 /* AppController.mm in Sources */,
|
509D4ABC17EBB2AB00697056 /* AppController.mm in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
@ -640,7 +667,13 @@
|
|||||||
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x/external/mac/libs";
|
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x/external/mac/libs";
|
||||||
OTHER_LDFLAGS = "";
|
OTHER_LDFLAGS = "";
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../cocos2d-x/cocos/platform/mac $(SRCROOT)/../../cocos2d-x/external/glfw3/include/mac $(SRCROOT)/../../cocos2d-x/external/mac/include/ $(SRCROOT)/../../cocos2d-x/external/mac/include/spidermonkey";
|
USER_HEADER_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/platform/mac",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/external/glfw3/include/mac",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/external/mac/include/",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/external/mac/include/spidermonkey",
|
||||||
|
);
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@ -665,7 +698,13 @@
|
|||||||
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x/external/mac/libs";
|
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x/external/mac/libs";
|
||||||
OTHER_LDFLAGS = "";
|
OTHER_LDFLAGS = "";
|
||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../cocos2d-x/cocos/platform/mac $(SRCROOT)/../../cocos2d-x/external/glfw3/include/mac $(SRCROOT)/../../cocos2d-x/external/mac/include/ $(SRCROOT)/../../cocos2d-x/external/mac/include/spidermonkey";
|
USER_HEADER_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/platform/mac",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/external/glfw3/include/mac",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/external/mac/include/",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/external/mac/include/spidermonkey",
|
||||||
|
);
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
@ -691,7 +730,25 @@
|
|||||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x $(SRCROOT)/../../cocos2d-x/cocos $(SRCROOT)/../../cocos2d-x/cocos/base $(SRCROOT)/../../cocos2d-x/cocos/physics $(SRCROOT)/../../cocos2d-x/cocos/math/kazmath $(SRCROOT)/../../cocos2d-x/cocos/2d $(SRCROOT)/../../cocos2d-x/cocos/gui $(SRCROOT)/../../cocos2d-x/cocos/network $(SRCROOT)/../../cocos2d-x/cocos/audio/include $(SRCROOT)/../../cocos2d-x/cocos/editor-support $(SRCROOT)/../../cocos2d-x/extensions $(SRCROOT)/../../cocos2d-x/external $(SRCROOT)/../../cocos2d-x/external/sources $(SRCROOT)/../../cocos2d-x/external/chipmunk/include/chipmunk $(SRCROOT)/../../cocos2d-x/cocos/scripting/js-bindings/auto $(SRCROOT)/../../cocos2d-x/cocos/scripting/js-bindings/manual $(SRCROOT)/../../cocos2d-x/external/mac/include/v8";
|
USER_HEADER_SEARCH_PATHS = (
|
||||||
|
"$(SRCROOT)/../../cocos2d-x",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/base",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/physics",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/math/kazmath",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/2d",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/gui",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/network",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/audio/include",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/editor-support",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/extensions",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/external",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/external/sources",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/external/chipmunk/include/chipmunk",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/scripting/js-bindings/auto",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/scripting/js-bindings/manual",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/external/mac/include/v8",
|
||||||
|
);
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@ -714,7 +771,25 @@
|
|||||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||||
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
|
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x $(SRCROOT)/../../cocos2d-x/cocos $(SRCROOT)/../../cocos2d-x/cocos/base $(SRCROOT)/../../cocos2d-x/cocos/physics $(SRCROOT)/../../cocos2d-x/cocos/math/kazmath $(SRCROOT)/../../cocos2d-x/cocos/2d $(SRCROOT)/../../cocos2d-x/cocos/gui $(SRCROOT)/../../cocos2d-x/cocos/network $(SRCROOT)/../../cocos2d-x/cocos/audio/include $(SRCROOT)/../../cocos2d-x/cocos/editor-support $(SRCROOT)/../../cocos2d-x/extensions $(SRCROOT)/../../cocos2d-x/external $(SRCROOT)/../../cocos2d-x/external/sources $(SRCROOT)/../../cocos2d-x/external/chipmunk/include/chipmunk $(SRCROOT)/../../cocos2d-x/cocos/scripting/js-bindings/auto $(SRCROOT)/../../cocos2d-x/cocos/scripting/js-bindings/manual $(SRCROOT)/../../cocos2d-x/external/mac/include/v8";
|
USER_HEADER_SEARCH_PATHS = (
|
||||||
|
"$(SRCROOT)/../../cocos2d-x",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/base",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/physics",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/math/kazmath",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/2d",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/gui",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/network",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/audio/include",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/editor-support",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/extensions",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/external",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/external/sources",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/external/chipmunk/include/chipmunk",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/scripting/js-bindings/auto",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/scripting/js-bindings/manual",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/external/mac/include/v8",
|
||||||
|
);
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
@ -726,6 +801,7 @@
|
|||||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = "JMKA-mobile.entitlements";
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
COMPRESS_PNG_FILES = NO;
|
COMPRESS_PNG_FILES = NO;
|
||||||
DEVELOPMENT_TEAM = 6L2252GUFG;
|
DEVELOPMENT_TEAM = 6L2252GUFG;
|
||||||
@ -742,7 +818,10 @@
|
|||||||
HEADER_SEARCH_PATHS = "";
|
HEADER_SEARCH_PATHS = "";
|
||||||
INFOPLIST_FILE = ios/Info.plist;
|
INFOPLIST_FILE = ios/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x/external/ios/libs";
|
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x/external/ios/libs";
|
||||||
MARKETING_VERSION = 2.0;
|
MARKETING_VERSION = 2.0;
|
||||||
OTHER_LDFLAGS = (
|
OTHER_LDFLAGS = (
|
||||||
@ -755,7 +834,14 @@
|
|||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../cocos2d-x/cocos/platform/ios $(SRCROOT)/../../cocos2d-x/plugin/jsbindings/auto $(SRCROOT)/../../cocos2d-x/plugin/jsbindings/manual $(SRCROOT)/../../cocos2d-x/external/ios/include $(SRCROOT)/../../cocos2d-x/external/ios/include/spidermonkey";
|
USER_HEADER_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/platform/ios",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/plugin/jsbindings/auto",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/plugin/jsbindings/manual",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/external/ios/include",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/external/ios/include/spidermonkey",
|
||||||
|
);
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@ -766,6 +852,7 @@
|
|||||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = "JMKA-mobile.entitlements";
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
COMPRESS_PNG_FILES = NO;
|
COMPRESS_PNG_FILES = NO;
|
||||||
DEVELOPMENT_TEAM = 6L2252GUFG;
|
DEVELOPMENT_TEAM = 6L2252GUFG;
|
||||||
@ -781,7 +868,10 @@
|
|||||||
HEADER_SEARCH_PATHS = "";
|
HEADER_SEARCH_PATHS = "";
|
||||||
INFOPLIST_FILE = ios/Info.plist;
|
INFOPLIST_FILE = ios/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x/external/ios/libs";
|
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x/external/ios/libs";
|
||||||
MARKETING_VERSION = 2.0;
|
MARKETING_VERSION = 2.0;
|
||||||
OTHER_LDFLAGS = (
|
OTHER_LDFLAGS = (
|
||||||
@ -793,7 +883,14 @@
|
|||||||
SWIFT_OBJC_BRIDGING_HEADER = "JMKA_mobile-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "JMKA_mobile-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../cocos2d-x/cocos/platform/ios $(SRCROOT)/../../cocos2d-x/plugin/jsbindings/auto $(SRCROOT)/../../cocos2d-x/plugin/jsbindings/manual $(SRCROOT)/../../cocos2d-x/external/ios/include $(SRCROOT)/../../cocos2d-x/external/ios/include/spidermonkey";
|
USER_HEADER_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/cocos/platform/ios",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/plugin/jsbindings/auto",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/plugin/jsbindings/manual",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/external/ios/include",
|
||||||
|
"$(SRCROOT)/../../cocos2d-x/external/ios/include/spidermonkey",
|
||||||
|
);
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
@ -828,6 +925,30 @@
|
|||||||
defaultConfigurationName = Release;
|
defaultConfigurationName = Release;
|
||||||
};
|
};
|
||||||
/* End XCConfigurationList section */
|
/* End XCConfigurationList section */
|
||||||
|
|
||||||
|
/* Begin XCRemoteSwiftPackageReference section */
|
||||||
|
FEC511AE28B8972800ED3051 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = {
|
||||||
|
isa = XCRemoteSwiftPackageReference;
|
||||||
|
repositoryURL = "https://github.com/firebase/firebase-ios-sdk";
|
||||||
|
requirement = {
|
||||||
|
kind = upToNextMajorVersion;
|
||||||
|
minimumVersion = 9.0.0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
/* End XCRemoteSwiftPackageReference section */
|
||||||
|
|
||||||
|
/* Begin XCSwiftPackageProductDependency section */
|
||||||
|
FEC511AF28B8972800ED3051 /* FirebaseAnalytics */ = {
|
||||||
|
isa = XCSwiftPackageProductDependency;
|
||||||
|
package = FEC511AE28B8972800ED3051 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
|
||||||
|
productName = FirebaseAnalytics;
|
||||||
|
};
|
||||||
|
FEC511B128B8972800ED3051 /* FirebaseMessaging */ = {
|
||||||
|
isa = XCSwiftPackageProductDependency;
|
||||||
|
package = FEC511AE28B8972800ED3051 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
|
||||||
|
productName = FirebaseMessaging;
|
||||||
|
};
|
||||||
|
/* End XCSwiftPackageProductDependency section */
|
||||||
};
|
};
|
||||||
rootObject = A92275341517C094001B78AA /* Project object */;
|
rootObject = A92275341517C094001B78AA /* Project object */;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,113 @@
|
|||||||
|
{
|
||||||
|
"pins" : [
|
||||||
|
{
|
||||||
|
"identity" : "abseil-cpp-swiftpm",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/firebase/abseil-cpp-SwiftPM.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "583de9bd60f66b40e78d08599cc92036c2e7e4e1",
|
||||||
|
"version" : "0.20220203.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "boringssl-swiftpm",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/firebase/boringssl-SwiftPM.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "dd3eda2b05a3f459fc3073695ad1b28659066eab",
|
||||||
|
"version" : "0.9.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "firebase-ios-sdk",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/firebase/firebase-ios-sdk",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "7f31a43f8c49bd4a1723bc9fecdfaa4411dd9f36",
|
||||||
|
"version" : "9.5.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "googleappmeasurement",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/google/GoogleAppMeasurement.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "f54f60d0164d887e1174fa51ab2efe48a8e9d178",
|
||||||
|
"version" : "9.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "googledatatransport",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/google/GoogleDataTransport.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "5056b15c5acbb90cd214fe4d6138bdf5a740e5a8",
|
||||||
|
"version" : "9.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "googleutilities",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/google/GoogleUtilities.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "f4abe56ce62a779e64b525eb133c8fc2a84bbc1f",
|
||||||
|
"version" : "7.7.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "grpc-ios",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/grpc/grpc-ios.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "8440b914756e0d26d4f4d054a1c1581daedfc5b6",
|
||||||
|
"version" : "1.44.3-grpc"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "gtm-session-fetcher",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/google/gtm-session-fetcher.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "19605024d59eaefdb1f6a2cb11ebe75df4421126",
|
||||||
|
"version" : "2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "leveldb",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/firebase/leveldb.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "0706abcc6b0bd9cedfbb015ba840e4a780b5159b",
|
||||||
|
"version" : "1.22.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "nanopb",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/firebase/nanopb.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692",
|
||||||
|
"version" : "2.30909.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "promises",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/google/promises.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "3e4e743631e86c8c70dbc6efdc7beaa6e90fd3bb",
|
||||||
|
"version" : "2.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "swift-protobuf",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/apple/swift-protobuf.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "131a3fc8097ef2f30b4170e88cdc234b615b6a29",
|
||||||
|
"version" : "1.20.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version" : 2
|
||||||
|
}
|
Binary file not shown.
@ -7,13 +7,34 @@
|
|||||||
<key>JMKA-desktop.xcscheme_^#shared#^_</key>
|
<key>JMKA-desktop.xcscheme_^#shared#^_</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>2</integer>
|
<integer>3</integer>
|
||||||
</dict>
|
</dict>
|
||||||
<key>JMKA-mobile.xcscheme_^#shared#^_</key>
|
<key>JMKA-mobile.xcscheme_^#shared#^_</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
</dict>
|
</dict>
|
||||||
|
<key>Promises (Playground) 1.xcscheme</key>
|
||||||
|
<dict>
|
||||||
|
<key>isShown</key>
|
||||||
|
<false/>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>5</integer>
|
||||||
|
</dict>
|
||||||
|
<key>Promises (Playground) 2.xcscheme</key>
|
||||||
|
<dict>
|
||||||
|
<key>isShown</key>
|
||||||
|
<false/>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>6</integer>
|
||||||
|
</dict>
|
||||||
|
<key>Promises (Playground).xcscheme</key>
|
||||||
|
<dict>
|
||||||
|
<key>isShown</key>
|
||||||
|
<false/>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>4</integer>
|
||||||
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
#import <StoreKit/StoreKit.h>
|
||||||
|
#import <AuthenticationServices/AuthenticationServices.h>
|
||||||
|
|
||||||
@class RootViewController;
|
@class RootViewController;
|
||||||
|
|
||||||
@ -32,6 +34,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
+ (void) JSBridge:(NSString *)value1 value2:(NSString *)value2;
|
+ (void) JSBridge:(NSString *)value1 value2:(NSString *)value2;
|
||||||
|
+ (NSString*) getIntent;
|
||||||
|
+ (void) FirebaseGetToken;
|
||||||
+ (void) TTS_Play:(NSString *) msg;
|
+ (void) TTS_Play:(NSString *) msg;
|
||||||
|
|
||||||
@property(nonatomic, readonly) RootViewController* viewController;
|
@property(nonatomic, readonly) RootViewController* viewController;
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#import "AppDelegate.h"
|
#import "AppDelegate.h"
|
||||||
#import "RootViewController.h"
|
#import "RootViewController.h"
|
||||||
#import "SDKWrapper.h"
|
#import "SDKWrapper.h"
|
||||||
|
#import "Firebase_OC.h"
|
||||||
#import "platform/ios/CCEAGLView-ios.h"
|
#import "platform/ios/CCEAGLView-ios.h"
|
||||||
#include "cocos/scripting/js-bindings/jswrapper/SeApi.h"
|
#include "cocos/scripting/js-bindings/jswrapper/SeApi.h"
|
||||||
#import "JMKA_mobile-Swift.h"
|
#import "JMKA_mobile-Swift.h"
|
||||||
@ -42,7 +43,11 @@ using namespace cocos2d;
|
|||||||
Application* app = nullptr;
|
Application* app = nullptr;
|
||||||
Sound_S* Sound = nullptr;
|
Sound_S* Sound = nullptr;
|
||||||
TTS_S* TTS = nullptr;
|
TTS_S* TTS = nullptr;
|
||||||
|
//Firebase_OC* Firebase = nullptr;
|
||||||
@synthesize window;
|
@synthesize window;
|
||||||
|
std::string UrlData = "null";
|
||||||
|
std::string UrlData_Q = "";
|
||||||
|
std::string IsStart = "0";
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
#pragma mark Application lifecycle
|
#pragma mark Application lifecycle
|
||||||
@ -85,8 +90,10 @@ TTS_S* TTS = nullptr;
|
|||||||
|
|
||||||
Sound = [[Sound_S alloc]init];
|
Sound = [[Sound_S alloc]init];
|
||||||
TTS = [[TTS_S alloc]init];
|
TTS = [[TTS_S alloc]init];
|
||||||
|
// Firebase = [[Firebase_OC alloc]init];
|
||||||
|
|
||||||
[Sound StartPlay];
|
[Sound StartPlay];
|
||||||
|
[Firebase_OC application:application didFinishLaunchingWithOptions:launchOptions];
|
||||||
|
|
||||||
//run the cocos2d-x game scene
|
//run the cocos2d-x game scene
|
||||||
app->start();
|
app->start();
|
||||||
@ -94,6 +101,53 @@ TTS_S* TTS = nullptr;
|
|||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// With "FirebaseAppDelegateProxyEnabled": NO
|
||||||
|
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
|
||||||
|
[Firebase_OC application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{
|
||||||
|
[Firebase_OC application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
iOS 9.0 之后
|
||||||
|
三方唤起本程序后执行的方法
|
||||||
|
return YES 表示允许唤起本程序
|
||||||
|
*/
|
||||||
|
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options{
|
||||||
|
NSLog(@"URL scheme:%@", [url scheme]);
|
||||||
|
//参数
|
||||||
|
NSLog(@"URL host:%@", [url host]);
|
||||||
|
// UIAlertView *alertView=[[UIAlertView alloc] initWithTitle:@"分享" message:[url host] delegate:self cancelButtonTitle:nil otherButtonTitles:@"分享完成", nil];
|
||||||
|
// [alertView show];
|
||||||
|
|
||||||
|
|
||||||
|
NSLog(@"openURL");
|
||||||
|
NSString *UrlData_url = [url.absoluteString stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
||||||
|
NSString *UrlData_query = [[url query] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
||||||
|
NSString *UrlData_host = [url host];
|
||||||
|
NSString *UrlData_path = [url path];
|
||||||
|
NSString *UrlData_port = [[url port] stringValue];
|
||||||
|
NSString *UrlData_scheme = [url scheme];
|
||||||
|
|
||||||
|
NSString *Msg_UrlData = [NSString stringWithFormat:@"open Url: %@#Query$%@#Host$%@#Path$%@#Port$%@#Scheme$%@", UrlData_url, UrlData_query, UrlData_host, UrlData_path, UrlData_port, UrlData_scheme];
|
||||||
|
NSLog(@"Msg_UrlData:'%@'",Msg_UrlData);
|
||||||
|
UrlData = std::string([Msg_UrlData UTF8String]);
|
||||||
|
if(UrlData_query) {
|
||||||
|
UrlData_Q = std::string([UrlData_query UTF8String]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)application:(UIApplication *)application performActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem completionHandler:(void (^)(BOOL))completionHandler {
|
||||||
|
|
||||||
|
NSLog(@"%@", shortcutItem.type);
|
||||||
|
NSString *Msg_UrlData = [NSString stringWithFormat:@"Query$%@", [self encodeDictionary:shortcutItem.userInfo]];
|
||||||
|
UrlData = std::string([Msg_UrlData UTF8String]);
|
||||||
|
}
|
||||||
|
|
||||||
- (void)applicationWillResignActive:(UIApplication *)application {
|
- (void)applicationWillResignActive:(UIApplication *)application {
|
||||||
/*
|
/*
|
||||||
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||||
@ -109,6 +163,16 @@ TTS_S* TTS = nullptr;
|
|||||||
*/
|
*/
|
||||||
app->onResume();
|
app->onResume();
|
||||||
[[SDKWrapper getInstance] applicationDidBecomeActive:application];
|
[[SDKWrapper getInstance] applicationDidBecomeActive:application];
|
||||||
|
|
||||||
|
if(IsStart == "1" && UrlData_Q != "") {
|
||||||
|
std::string method = "DispatchCallback";
|
||||||
|
std::string value = UrlData_Q;
|
||||||
|
// 呼叫JS的window.JSBridge
|
||||||
|
std::string jsCallStr = cocos2d::StringUtils::format("JSBridge(\"%s\", \"%s\");", method.c_str(), value.c_str());
|
||||||
|
se::Value *ret = new se::Value();
|
||||||
|
se::ScriptEngine::getInstance()->evalString(jsCallStr.c_str() , -1 , ret);
|
||||||
|
UrlData_Q = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
||||||
@ -123,7 +187,7 @@ TTS_S* TTS = nullptr;
|
|||||||
/*
|
/*
|
||||||
Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
|
Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
|
||||||
*/
|
*/
|
||||||
[[SDKWrapper getInstance] applicationWillEnterForeground:application];
|
[[SDKWrapper getInstance] applicationWillEnterForeground:application];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationWillTerminate:(UIApplication *)application
|
- (void)applicationWillTerminate:(UIApplication *)application
|
||||||
@ -154,6 +218,32 @@ TTS_S* TTS = nullptr;
|
|||||||
se::ScriptEngine::getInstance()->evalString(jsCallStr.c_str() , -1 , ret);
|
se::ScriptEngine::getInstance()->evalString(jsCallStr.c_str() , -1 , ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (NSString*) getIntent {
|
||||||
|
if(IsStart == "0") {
|
||||||
|
IsStart = "1";
|
||||||
|
}
|
||||||
|
std::string jsCallStr = cocos2d::StringUtils::format("cc.log(\"getIntent GO\");");
|
||||||
|
se::Value *ret = new se::Value();
|
||||||
|
se::ScriptEngine::getInstance()->evalString(jsCallStr.c_str() , -1 , ret);
|
||||||
|
// NSLog(@"Msg :%@",Msg);
|
||||||
|
// return @"getIntent OK";
|
||||||
|
|
||||||
|
return [NSString stringWithUTF8String:UrlData.c_str()];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark- FireBase
|
||||||
|
|
||||||
|
+ (void) FirebaseGetToken {
|
||||||
|
NSString *fcmToken = [Firebase_OC FcmToken];
|
||||||
|
|
||||||
|
// 呼叫JS的window.JSBridge
|
||||||
|
std::string value = std::string([fcmToken UTF8String]);
|
||||||
|
std::string jsCallStr = cocos2d::StringUtils::format("Firebase_log(\"%s\");", value.c_str());
|
||||||
|
se::Value *ret = new se::Value();
|
||||||
|
se::ScriptEngine::getInstance()->evalString(jsCallStr.c_str() , -1 , ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark- TTS
|
||||||
+ (void) TTS_Play:(NSString *) msg {
|
+ (void) TTS_Play:(NSString *) msg {
|
||||||
[TTS playWithMsg:msg];
|
[TTS playWithMsg:msg];
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
//
|
||||||
|
// Firebase_OC.h
|
||||||
|
// JMKA-mobile
|
||||||
|
//
|
||||||
|
// Created by JianMiau on 2022/8/26.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <UserNotifications/UNUserNotificationCenter.h>
|
||||||
|
#import <FirebaseMessaging/FIRMessaging.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface Firebase_OC : NSObject <UIApplicationDelegate, UNUserNotificationCenterDelegate, FIRMessagingDelegate>
|
||||||
|
|
||||||
|
+ (NSString*)FcmToken;
|
||||||
|
+ (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
|
||||||
|
+ (void)application:(UIApplication *)application
|
||||||
|
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
|
||||||
|
+ (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
@ -0,0 +1,121 @@
|
|||||||
|
//
|
||||||
|
// Firebase_OC.m
|
||||||
|
// JMKA-mobile
|
||||||
|
//
|
||||||
|
// Created by JianMiau on 2022/8/26.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "Firebase_OC.h"
|
||||||
|
#import "AppController.h"
|
||||||
|
#import "FirebaseCore/FirebaseCore.h"
|
||||||
|
#import <FirebaseMessaging/FIRMessaging.h>
|
||||||
|
#import <UserNotifications/UserNotifications.h>
|
||||||
|
|
||||||
|
@implementation Firebase_OC
|
||||||
|
|
||||||
|
NSString *fcmtoken = @"";
|
||||||
|
|
||||||
|
+ (NSString*)FcmToken
|
||||||
|
{
|
||||||
|
return fcmtoken;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||||
|
// Use Firebase library to configure APIs
|
||||||
|
[FIRApp configure];
|
||||||
|
|
||||||
|
if ([UNUserNotificationCenter class] != nil) {
|
||||||
|
// iOS 10 or later
|
||||||
|
// For iOS 10 display notification (sent via APNS)
|
||||||
|
[UNUserNotificationCenter currentNotificationCenter].delegate = self;
|
||||||
|
UNAuthorizationOptions authOptions = UNAuthorizationOptionAlert | UNAuthorizationOptionSound | UNAuthorizationOptionBadge;
|
||||||
|
[[UNUserNotificationCenter currentNotificationCenter]
|
||||||
|
requestAuthorizationWithOptions:authOptions
|
||||||
|
completionHandler:^(BOOL granted, NSError * _Nullable error) {
|
||||||
|
// ...
|
||||||
|
}];
|
||||||
|
} else {
|
||||||
|
// iOS 10 notifications aren't available; fall back to iOS 8-9 notifications.
|
||||||
|
UIUserNotificationType allNotificationTypes =
|
||||||
|
(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge);
|
||||||
|
UIUserNotificationSettings *settings =
|
||||||
|
[UIUserNotificationSettings settingsForTypes:allNotificationTypes categories:nil];
|
||||||
|
[application registerUserNotificationSettings:settings];
|
||||||
|
}
|
||||||
|
|
||||||
|
[application registerForRemoteNotifications];
|
||||||
|
[FIRMessaging messaging].delegate = self;
|
||||||
|
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+ (void)messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken {
|
||||||
|
NSLog(@"FCM registration token: %@", fcmToken);
|
||||||
|
fcmtoken = fcmToken;
|
||||||
|
// Notify about received token.
|
||||||
|
NSDictionary *dataDict = [NSDictionary dictionaryWithObject:fcmToken forKey:@"token"];
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:
|
||||||
|
@"FCMToken" object:nil userInfo:dataDict];
|
||||||
|
// TODO: If necessary send token to application server.
|
||||||
|
// Note: This callback is fired at each app startup and whenever a new token is generated.
|
||||||
|
}
|
||||||
|
|
||||||
|
// With "FirebaseAppDelegateProxyEnabled": NO
|
||||||
|
+ (void)application:(UIApplication *)application
|
||||||
|
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
|
||||||
|
NSLog(@"FCM deviceToken: %@", deviceToken);
|
||||||
|
[FIRMessaging messaging].APNSToken = deviceToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 遠端通知
|
||||||
|
// Receive displayed notifications for iOS 10 devices.
|
||||||
|
// Handle incoming notification messages while app is in the foreground.
|
||||||
|
+ (void)userNotificationCenter:(UNUserNotificationCenter *)center
|
||||||
|
willPresentNotification:(UNNotification *)notification
|
||||||
|
withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler {
|
||||||
|
NSDictionary *userInfo = notification.request.content.userInfo;
|
||||||
|
|
||||||
|
// With swizzling disabled you must let Messaging know about the message, for Analytics
|
||||||
|
// [[FIRMessaging messaging] appDidReceiveMessage:userInfo];
|
||||||
|
|
||||||
|
// ...
|
||||||
|
|
||||||
|
// Print full message.
|
||||||
|
NSLog(@"%@", userInfo);
|
||||||
|
|
||||||
|
// Change this to your preferred presentation option
|
||||||
|
completionHandler(UNNotificationPresentationOptionBadge | UNNotificationPresentationOptionAlert);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 點擊通知
|
||||||
|
// Handle notification messages after display notification is tapped by the user.
|
||||||
|
+ (void)userNotificationCenter:(UNUserNotificationCenter *)center
|
||||||
|
didReceiveNotificationResponse:(UNNotificationResponse *)response
|
||||||
|
withCompletionHandler:(void(^)(void))completionHandler {
|
||||||
|
NSDictionary *userInfo = response.notification.request.content.userInfo;
|
||||||
|
|
||||||
|
|
||||||
|
// With swizzling disabled you must let Messaging know about the message, for Analytics
|
||||||
|
// [[FIRMessaging messaging] appDidReceiveMessage:userInfo];
|
||||||
|
|
||||||
|
// Print full message.
|
||||||
|
NSLog(@"%@", userInfo);
|
||||||
|
|
||||||
|
NSString* title = [userInfo objectForKey:@"data_title"];
|
||||||
|
NSString* contect = [userInfo objectForKey:@"data_content"];
|
||||||
|
if (title && contect) {
|
||||||
|
[AppController JSBridge:title value2:contect];
|
||||||
|
}
|
||||||
|
|
||||||
|
completionHandler();
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{
|
||||||
|
NSDictionary* notd = [userInfo objectForKey:@"aps"];
|
||||||
|
NSDictionary* message = [notd objectForKey:@"alert"];
|
||||||
|
|
||||||
|
NSLog(@"%@",message);
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
Loading…
Reference in New Issue
Block a user