Phonegap CordovaLib Semantic error - ios

I am using Phonegap 2.4.0 for iOS. when i create a cordova project and run it in iPad5.1 simulator i got this error
semantic issue expected method to read dictionary element not found on
object of type 'Nsdictionary *'
i following this tutorial guide_getting-started_ios
and i don't know where i made mistake.

Check your xcode version - it needs to be 4.5 or above.
Rebuild your cordova / phonegap project after upgrading xcode and the error should go away.

If you have an updated version of Xcode, make sure your project/platforms/ios/build directory wasn't removed somehow.

Related

Unable to install app in simulator Xcode 9 beta

I downloaded Xcode 9 beta recently, and when I tried to run my app in the simulator it is not getting installed. I am getting this error in my Xcode every time I try to run the app.
This app was unable to be installed.
The application used to work in Xcode 8.3.3
Unfortunately, the error message doesn’t explain why the install failed. You can take a look at ~/Library/Logs/CoreSimulator/CoreSimulator.log to see if the rest of the error message is there with more info. If not, you should check out the sim device’s system log:
sudo xcode-select -s /Applications/Xcode-beta.app # if you haven’t already
xcrun simctl spawn booted log show
You can use --predicate to filter that down a bit.
Late answer but might be that can be useful for others. I just get a project with existing watch-kit and custom keyboard code. After change the identifier i got the same error and i spend 1 day to find out why that happens.
I checked everything of bundle id and all version. then i do global search in xcode with old identifier and i found that following.
Here in both .plist file have old WKCompanionAppBundleIdentifier so after i update it with new manually application run again.
IMPORTANT NOTE:
IF YOU ARE JUST CHANGE IDENTIFIER FROM GENERAL TAB THAT DOES NOT MEAN IT UPDATE AT ALL. KINDLY CHECK WITH ALL POSSIBLE PLACES BY SEARCH AND REPLACE IT WITH NEW IDENTIFIER.
XCODE VERSIO: Version 9.0 (9A235)
I ran into this same issue and a quick click on Product > Clean did the trick for me!
If you are using CocoaPods in your project please have a look at this answer: https://stackoverflow.com/a/44533287/221194
Changing the status of the pods subdirectory helped me with my project.
I had a similar issue when installing my App on the IOS simulator (with Xcode 9).
I found the issue (at least for my case), it was due to an unauthorized key (Privacy - Location When In Use Usage Description) in the info.plist of the Watch App.
I have moved this key to the info.plist of the WatchKit Extension and now the App installs again.
I hope it will help others people having the same issue.
change deployment target as per requirement.
select project > GENERAL > DEPLOYMENT TARGET
also check ios version of your device
I had the same issue. Log shows it's an error caused by Google Signin:
FunctionName=-[MobileInstallationHelperService stageItemAtURL:completion:], SourceFileLine=392, NSUnderlyingError=0x7f891e9a1270 {Error Domain=MIInstallerErrorDomain Code=4 "Failed to remove ACL" UserInfo={NSLocalizedDescription=Failed to remove ACL, FunctionName=-[MIFileManager _removeACLAtPath:isDir:error:]
However it works on iOS 9 & 10 simulator.
I got same error and I was using Cocoapods in my project and for me help just update pods.
I ran into this issue in Xcode 9.0 beta 5 after renaming a project that contained an iOS and watchOS app. To fix, I recreated the iOS target.
This issue could be triggered by multiple things however if you take a look at the logs at ~/Library/Logs/CoreSimulator/CoreSimulator.log and it states an error that reads :
NSUnderlyingError=0x7fb51c271ee0 Could not hardlink copy /originPath
to /destinationPath
it's possible that your Build number in your Project Target's settings is set to empty.
Go to Project Target > Identity > Build and set a Build number. You'll have to uninstall the the app in the simulator and re-install it before installing updated versions.
Please check the bundle identifier to solve the issue.
I had the same issue on XCode 9.3.1 when I wanted to add google map framework to my project manually.
To fix the problem I remove the google frameworks from Embedded binaries...

Cordova app failing to Archive with Xcode 7.1 (Cordova/CDVViewController.h file not found)

I've recently updated my Xcode to version 7.1 (from 7.0.1) and my Cordova app is failing to Archive with the error that says:
'Cordova/CDVViewController.h' file not found
in MainViewController.h file.
Searching through solutions on StackOverflow and elsewhere suggests that setting the project's Header Search Path from "$(OBJROOT)/UninstalledProducts/include"to "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" seems to solve the issue for a lot of people. However, this did not resolve the issue for me.
Is there anything that could be amiss? I never encountered a problem like this prior to updating Xcode.
Associated screenshot:
UPDATE: It seems like updating my Mac OS X to El Capitan might have fixed this problem as I no longer get it. At the time of posting this question, I was on Yosemite. Hope this helps anyone encountering the same issue
This is the solution!
Add this line to your Build Settings -> Header Search Paths:
"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include"
This is a problem with 7.1 check out this thread which may help (on the ionic forums but isn't an ionic specific issue, it's Cordova with XCode 7.1) http://forum.ionicframework.com/t/cordova-cdvviewcontroller-h-file-not-found-in-xcode-7-1-beta/32232
I found a solution on this thread which worked for me with Xcode 7.1 (I was still having problems on OS X El Capitan).
Gandhi's answer is:
Run this in your terminal: cordova platform update ios
Open your project in Xcode
Go to Preference -> Locations -> Advanced
Choose "Unique" as the option for Build Location
Product -> Clean
Product -> Build
I found this solution at http://forum.ionicframework.com/t/cordova-cdvviewcontroller-h-file-not-found-in-xcode-7-1-beta/32232:
Add this line to your Build Settings -> Header Search Paths:
"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include"
Don't replace the existing line that looks similar, that is still needed to be backwards compatible with Xcode 7 and Xcode 6.4.
but doesn't work for old Cordova versions. I cannot upgrade to recent version of Cordova, so after a little try&search approach I found a new solution that seem works on my environment:
"$(OBJROOT)/UninstalledProducts/$(CONFIGURATION)-$(PLATFORM_NAME)/include"
Same advice as before, don't replace the existing line, but append the new role at the end.
Hope this should be useful.
On the screenshot I see a whitespace on "build/UninstalledProducts/iphoneos/include ", try removing it.
And you don't have to remove the old, "$(OBJROOT)/UninstalledProducts/include", you have to keep both

Worklight : Deprecated attempt to access property 'userAgent' on a non-Navigator object. and SideBar issue

We developed a Hybrid application on Phonegap with the help of IBM worklight 6.1. Worklight is using cordova version 3.1.
My first problem is that when I ran my project on IOS 8.1 platform getting by default sidebar on my screen(i.e. surrounded by red line in attached screen shot).I tried to debug but not able to find out the issue.
![sidebar][]
My second problem is that on every run i am getting "Deprecated attempt to access property 'userAgent' on a non-Navigator object.". I followed this link "Cordova - Deprecated attempt to access property 'userAgent' on a non-Navigator object" but still i have same error.
Any help on the matter would be good
Thank you in advance
The first issue was reported as resolved in the comments after upgrading to MobileFirst Platform 6.3 (which uses Cordova v3.6.3).
The second issue is a Cordova defect, resolved starting Cordova v3.7.
The issue was determined to be harmless as it does not not affect actual execution.
So you case safely ignore it.
However, if you spot related action that does fail (you did not specifically make that claim), do mention it. It will then be re-considered if to back-port the fix...

'Cordova/CDVViewController.h' not found when Archiving in Xcode (from Worklight)

I'm suffering this error message when trying to Archive my app prior to submission to the App Store.
The full error is:
In file included from /Users/Kevin/Documents/workspace/SongLink2/apps/SLPhone/iphone/native/Classes/CDVMainViewController.m:14:
In file included from Classes/CDVMainViewController.h:15:
/Users/Kevin/Documents/workspace/SongLink2/apps/SLPhone/iphone/native/WorklightSDK/include/MainViewController.h:34:9: fatal error: 'Cordova/CDVViewController.h' file not found
#import <Cordova/CDVViewController.h>
^
1 error generated.
I'm using Worklight 6.2 to generate the project having added both Android and iPhone environments). I then switch to Xcode 6 to Run my app. This is successful for Run but fails when I Product->Archive with the error.
I've recently upgraded everything to:
IBM Worklight Studio 6.2.0.00-20140915-1601
Xcode 6.0.1 (6A317)
... but with no success.
I've tried:
Changing Header>Search Paths: but this had no effect. This also suggest reinstalling Cordova but I'm unsure how to do this in a Worklight environment.
Perform Product->Clean with no effect. This discussion also suggested running ./update_cordova_subproject /path/to/your/project but I don't know where Worklight installed cordova to try it.
Many discussions suggest Xcode->Preferences->Locations->Advanced and make sure it's set to Unique... but I'm already set to this value.
similar: but this didn't seem to get resolved
Please help me on my last step to app store submission!
In looking at the Header Search Path(s) I noticed I'd introduced an extra double quote which was causing Xcode some confusion! Once I removed that it worked fine.
Many thanks
I experienced this problem and the solution was a classic XCode mystery incantation to add to your search path:
"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include"
Found on this website:
http://forum.ionicframework.com/t/cordova-cdvviewcontroller-h-file-not-found-in-xcode-7-1-beta/32232/4

Facebook SDK giving unused variable compile errors in Xcode 5.1

I'm getting a lot of unused variable errors after updating to the new version of and Xcode 5.1.
Compiler is saying unused variables are errors, and checked the compiler settings that i didn't modify treating warning as errors.
This only happened after I updated to Xcode 5.1
There seems to be indeed an issue with Facebook iOS SDK and compiling on Xcode 5.1 even if compiling it by itself.
I opened a bug in the Facebook support system:
https://developers.facebook.com/x/bugs/1449419898627543/
As a temporary workaround - you can fix it by turning off treating warnings as errors ( a very good practice by itself btw I use for our SDK) by:
1. Open the Facebook proj file (or the project inside an existing project
2. Go to build settings of the entire project
3. Change the "Treat Warnings as Errors" field from YES to NO.
This will let you compile it even with these warnings - but do be alert for an updated sdk in the coming days.
The problem was that we were unintentionally compiling for 64bit in the internal compiler settings somewhere inside our scripts. Please be aware.

Resources