PhoneGap iOS App Icon [duplicate] - ios

This question already has answers here:
How to add app icon within phonegap projects?
(14 answers)
Closed 9 years ago.
So I'm trying to specify my custom iOS icons for my app in my config.xml file, using the guide at https://build.phonegap.com/docs/config-xml
However, when I use the line of code they give you, the app fails to load, and throws an error in XCode;
2013-07-24 09:32:06.121 iLens[19852:c07] *** Assertion failure in -[CDVConfigParser parser:parseErrorOccurred:], /Applications/MAMP/htdocs/carlzeiss/phonegap-2.9.0/iLens/CordovaLib/Classes/CDVConfigParser.m:93
2013-07-24 09:32:06.121 iLens[19852:c07] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'config.xml parse error line 38 col 40'
*** First throw call stack:
(0x173012 0x28eee7e 0x172e78 0x1564665 0x7a352 0x15aca08 0x58e02af 0x58fa745 0x590225a 0x59044e5 0x5903f07 0x15ac8fe 0x15ac890 0x15acb46 0x15acbfa 0x590d2 0x57ea0 0x57f6e 0x83749 0x48de1e 0x5802e 0x837ad 0x8326b 0x3ac157 0x3ac747 0x3ad94b 0x3becb5 0x3bfbeb 0x3b1698 0x3720df9 0x3720ad0 0xe8bf5 0xe8962 0x119bb6 0x118f44 0x118e1b 0x3ad17a 0x3aeffc 0x82f4c 0x82ea9)
libc++abi.dylib: terminate called throwing an exception
If I remove the gap:platform="ios" part, the app loads, but the icon doesn't change.
Does anyone have a working example of changing icons through the config.xml file please?
Note: I don't believe this is a duplicate of the question that has been linked to this question. My question is in regards to adding icons through the config.xml file, as you should be able to do as per the PhoneGap documents. However, it turns out that they didn't support this option at that time.

Open Your project in Xcode and place App Icon it will work.

Related

Here Map iOS Swift Crashed After call NMAApplicationContext.set(appId:.. appCode:...)

I am new on using Here Map's tools (https://developer.here.com). Currently, I am trying to integrate here map tools into my iOS Swift 3 project. However, the first step is to announce my license key and app code that I obtained from here map website by using the following Swift 3 code in the AppDelegate.swift:
NMAApplicationContext.set(appId: kHelloMapAppID, appCode: kHelloMapAppCode)
It crashed my app with the following error messages:
Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '-[__NSCFString appendString:]:
nil argument' First throw call stack: (0x18bed91b8 0x18a91055c
0x18bed9100 0x18be76444 0x10023fad0 0x100260480 0x10025f6a8
0x10025f918 0x1011d9258 0x1011d9218 0x1011e6aec 0x1011dcce0
0x1011e8e2c 0x1011e8b78 0x18af6b2a0 0x18af6ad8c) libc++abi.dylib:
terminating with uncaught exception of type NSException
The sample project that came with the here map SDK has the same problem.
Is there anyone knowing how to use the SDK?
Finally I figured out what's going on. Except adding the NMAKit.framework into the Xcode environment, we also need to add the link of the bundle, NMABundle.bundle into the environment. The file resides at NMAKit.framework/Resources/NMABundle.bundle so the Xcode environment should have the links of two files:
ProjectName
|
ProjectName
| |
| NMABundle.bundle
|
Frameworks
|
NMAKit.framework
....

App crashing "libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)"

So, after 1 hour of googling I still can't fix this error that I got. Whats happening is that every time I go to click my "Sign Up" button, the app crashes, its suppose to redirect me to a different view where the user can sign up with there email and password. I tried many things other users have posted but none of them seem to be working.
error code:
2016-11-14 23:30:52.363967 FHCI[4785:1536750] [Firebase/Core][I-COR000019] Clearcut post completed.
2016-11-14 23:30:52.364 FHCI[4785] <Debug> [Firebase/Core][I-COR000019] Clearcut post completed.
2016-11-14 23:30:53.561590 FHCI[4785:1536709] *** Terminating app due to uncaught exception 'com.firebase.core', reason: 'Default app has already been configured.'
*** First throw call stack:
(0x186e4a1c0 0x18588455c 0x186e4a108 0x100107358 0x100107120 0x1000a795c 0x1000a7a40 0x18cca50b0 0x18cca4c78 0x18d668ae4 0x18cfefb08 0x18cff72c4 0x18d010d04 0x18d013e5c 0x18cd97b54 0x18d464b9c 0x18d465d84 0x18d465b8c 0x18d465e5c 0x18ccda484 0x18ccda404 0x18ccc48b8 0x18ccd9cf0 0x18ccd9818 0x18ccd4a60 0x18cca552c 0x18d492a54 0x18d48c4bc 0x186df8278 0x186df7bc0 0x186df57c0 0x186d24048 0x1887aa198 0x18cd102fc 0x18cd0b034 0x1000aa388 0x185d085b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Picture of my code
Story board
Earlier, I have faced the same issue. Fix it by below solutions.
Solution:1
Please make sure FIRApp.configure() the statement executes once
throughout the project. If you have written more then one time then
you have to remove your second unused statement. It will solve your
problem.
Solution:2
1 ) Remove pod file from project (How to remove pod file)
2 ) Remove Old GoogleService-Info file from the project.
3 ) Download GoogleService-Info and add it into the project.
4 ) Add pods file Again.
5) Put the Below method in Appdelegate file.
override init() {
super.init()
FIRApp.configure()
}
I also had this problem. In my case the file GoogleService-Info.plist was not included in Copy Bundle Resources.
I have the same error the solution above didn't work for me.
Solution:
Just go to status bar of Xcode Product ⇒ clean
Image:
In my case I removed Main.storyboard but forgot to remove in from General target's settings. Removing it solved unexpected crash on app launch.

Integration and Use of W3i iOS Advertiser SDK to advertise our iOS app

I'm integrating W3i Advertiser SDK in iOS app, but app is being crashed at following line.
[[W3iAdvertiserSdk sharedConnector] connectWithAppID:W3I_APP_ID];
and here is exception:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryI W3iPublisherJSONRepresentation]: unrecognized selector sent to instance 0xa1d7520'
*** First throw call stack:
(0x29d3012 0x23fae7e 0x2a5e4bd 0x29c2bbc 0x29c294e 0x16af7a 0x3e25 0xcd57b7 0xcd5da7 0xcd6fab 0xce8315 0xce924b 0xcdacf8 0x2903df9 0x2903ad0 0x2948bf5 0x2948962 0x2979bb6 0x2978f44 0x2978e1b 0xcd67da 0xcd865c 0x2d08d 0x26c5)
libc++abi.dylib: terminate called throwing an exception
I Searched a lot but there is no information on net related to w3i's integration and it's use except w3i's official guideline.
https://associate.w3i.com/integration/W3i_iOS_Advertiser_SDK_Integration_Guide1.htm
https://associate.w3i.com/integration/index.html
Here are steps i'm following:
Step1: Download SDK from W3i
Step2: Drag W3iAdvertiserSdk-3.2.0 folder into project's file folder
Step3 Add a link to the following frameworks if not already present:
AdSupport.framework
UIKit.framework
Foundation.framework
CoreGraphics.framework
Step4: Add to your AppDelegate.m file, #import "W3iAdvertiserSdk.h"
If I run the app after above Integration then app runs fine without any error but when i call the method of W3iAdvertiser to connect with app then it it throws exception which i've already posted above.
// add this line to application's didFinishLaunchingWithOptions method
[[W3iAdvertiserSdk sharedConnector] connectWithAppID:W3I_APP_ID]; //appId created at w3i
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryI W3iPublisherJSONRepresentation]: unrecognized selector sent to instance 0xa1d7520'
*** First throw call stack:
(0x29d3012 0x23fae7e 0x2a5e4bd 0x29c2bbc 0x29c294e 0x16af7a 0x3e25 0xcd57b7 0xcd5da7 0xcd6fab 0xce8315 0xce924b 0xcdacf8 0x2903df9 0x2903ad0 0x2948bf5 0x2948962 0x2979bb6 0x2978f44 0x2978e1b 0xcd67da 0xcd865c 0x2d08d 0x26c5)
libc++abi.dylib: terminate called throwing an exception
Can anyone please guide me where i'm going wrong, how to use SDK's functions to connect App with w3i's to advertise our app through w3i ?
You need to follow this step as well:
Add -ObjC to Other Linker Flags in your target's Build Settings. That will allow "Option 1" to not crash.
There are two ways to connect app with w3i:
Option1: Integrate W3i-iOS-SDK, and call it's method "connectWithAppId" at start of application.
Option2: Call W3i "appWasRun" API at start of application
first option didn't work for me, but Option2 is quite easy and working fine.
Here is format of API and it's parameters:
http://api.w3i.com/PublicServices/MobileTrackingApiRestV1.svc/AppWasRun?AppId={APPID}&clientIp={CLIENTIP}&iOSIDFA={advertisingIdentifier}&iOSUDID={IOSUDID}&iOSOpenUDID={IOSOpenUDID}&iOSMD5WLANMAC={iOSMD5WLANMAC}&iOSSha1HashedMac={iOSSha1HashedMac}
Request Type: GET
Required Parameters: APPID (generated by W3I) and at-least one identifier (all parameters are preferred by W3i)
I used only OpenUDID and it worked fine.
http://api.w3i.com/PublicServices/MobileTrackingApiRestV1.svc/AppWasRun?AppId=W3i_APP_ID&iOSOpenUDID=OPEN_UDID
For More Information check the following links.
https://sites.google.com/site/w3ideveloperscom/ios/iOSAFPP/advapi
https://associate.w3i.com/integration/Device_Identifiers.htm
Hope it would help others in future :)

Unity iOS game crashing with NSInternalInconsistencyException

I am using Prime31's GameCenter Turn Based plugin in my game in order to handle online matches. A problem arises when I receive an "invitation to play" notification from Game Center while Game Center's matchmaker is showing (called using the plug-in => GameCenterTurnBasedBinding.findMatch(2,2,false); ).
The app crashes and the following output is shown in Xcode:
2012-08-20 08:39:27.050 Cabrais[1808:707] *** Assertion failure in -[NSIndexPath row], /SourceCache/UIKit/UIKit-1914.85/UITableViewSupport.m:2606
2012-08-20 08:39:27.052 Cabrais[1808:707] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid index path for use with UITableView. Index paths passed to table view must contain exactly two indices specifying the section and row. Please use the category on NSIndexPath in UITableView.h if possible.'
*** First throw call stack:
(0x355ec88f 0x33210259 0x355ec789 0x349e03a3 0x32d4d673 0x35dba49d 0x35dd90e5 0x35dd9379 0x32d4cefb 0x32d4bfd9 0x32d4b763 0x35da7657 0x32ceff37 0x3554b1fb 0x32716aa5 0x327166bd 0x327165c9 0x35dd8179 0x35da936b 0x35dbce65 0x35dbb6b3 0x33979c59 0x33984e91 0x355bf2ad 0x355424a5 0x3554236d 0x332dd439 0x32d1acd5 0x6954 0x3388)
terminate called throwing an exception(lldb)
I have tried disabling notifications through the Ipad/Iphone settings for both my app and GameCenter as well as through the code by removing all notification related code but this hasn't had any effect at all.
I know through debugging that the code in my function attached to GameCenterTurnBasedManager.handleTurnEventEvent doesn't get called before the crash occurs, and neither does the one registered to EtceteraManager.remoteNotificationReceived. (Both these function work perfectly fine otherwise.)
I have asked Prime31 and they have told me that the exception is a mishandling of the tables data source, and to file a bug report with Apple.
Has anyone experienced a similar crash/error while working with Unity?
And is there any way I can try to catch the notification before it arrives and remove the matchmaker or be able to handle the error from unity?
Any insight/help/comments would be greatly appreciated,
Thanks.

XCode4 Debugger Always Breaks in Main

After upgrading to XCode4 (v. 4.2, 4D199) it seems every time my apps crash while debugging, the debugging points to main(), and the stack is unsymbolicated and useless.
This has been working fine for years, I have no idea what has gone wrong.
I'm using GDB. I also tried the LLDB as per this advice, and it didn't work either (similar, useless stack).
My breakpoints work, I get the full stack, and can inspect variables when my code hits those.
Steps to reproduce:
NB. this happens with my own project, but I'll use Apple's code here to remove that variable from the equation
Download the following sample from Apple: https://developer.apple.com/library/ios/#samplecode/UICatalog/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007710
In the ImagesViewController class, add the following code to the viewDidLoad method (so it will crash – we want it to crash for this test):
// please note: this code is designed to crash! I want it to crash, to highlight my issue with XCode.
NSMutableArray* test = [NSMutableArray new];
[test insertObject:NULL atIndex:0];
Then run the app & hit the 'Images' row.
It crashes with a message like:
2011-12-23 14:07:02.788 UICatalog[13394:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
*** First throw call stack:
(0x37bbb8bf 0x316a11e5 0x37b1020f 0x699f 0x34fac7ff 0x34fb8c39 0x34fb8aa9 0x34fb898f 0x34fb815b 0x34fb7f53 0x34fac673 0x34fac349 0x66c1 0x35026565 0x3509ece7 0x31aec943 0x37b8fa63 0x37b8f6c9 0x37b8e29f 0x37b114dd 0x37b113a5 0x3768ffcd 0x34fa1743 0x2459 0x2418)
terminate called throwing an exception(gdb)
View in xcode:
Thanks to brigadir for pointing me to the solution!
It works well. Here's some screenshots for how to solve this for anyone finding my question:
Tap the plus button of the breakpoints tab
Then click Done

Resources