Xcode Moving code to a new project - xcode

When renaming a project the project became corrupted and i could not recover it. when opening the workspace no files are visible only the .xcworkspace file in red and the pods project file in red. the swift files remained so i copied them to a new project and now i cant get past the following error
2016-05-03 14:17:55.368 App Name[2194:827220] +[NSDate dateFromRFC3339String:]: unrecognized selector sent to class 0x397f0348
2016-05-03 14:17:55.369 App Name[2194:827220] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSDate dateFromRFC3339String:]: unrecognized selector sent to class 0x397f0348'
*** First throw call stack:
(0x2289798b 0x22032e17 0x2289d241 0x2289af51 0x227c62f8 0x1c2de3 0x1c31a7 0x1c2957 0x1c45cb 0x1c5525 0x22df92b9 0x230a9659 0x2300a723 0x22ffccf9 0x230ab911 0x18d3b6b 0x18d8655 0x22859bdd 0x228580d7 0x227a72e9 0x227a70d5 0x23d97ac9 0x26e6c0b9 0x160910 0x2244f873)
libc++abi.dylib: terminating with uncaught exception of type NSException
The same code worked fine in the previous project and the error. the project file does not appear to be present in the original file.
I need help on either debugging the above errors or to fix the original project.
any help will be greatly appreciated

Rebuild up your pods and the workspace by running pod install for this new project (perhaps clean out your Pods folder beforehand)
To be more clear
Backup you entire project and files somewhere
Exit xcode
If you are not using the xcworkspace for anything except pods, delete it
Delete the Pods folder
run pod install -- if there are errors, stop and tell us what they are
If there are no errors, you now have an .xcworkspace file and a Pods folder with pods
Open the .xcworkspace file in Xcode. Pods should not be red.

Related

Problem running an app on the iPhone with Xcode

Hello I am having some problems running my app on my iPhone when I run the app from me this error:
Xcode's output:
↳
error: unable to read property list from file: /Users/indumonta/AndroidStudioProjects/contagem_de_pessoas/ios/Runner/Info.plist: The operation couldn’t be completed. (XCBUtil.PropertyListConversionError error 1.) (in target 'Runner' from project 'Runner')
note: Using new build system
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
Error launching application on Tigomes.
Terminal:
MBP-de-Luis:~ indumonta$ plutil Info.plist
Info.plist: file does not exist or is not readable or is not a regular file (Error Domain=NSCocoaErrorDomain Code=260 "The file “Info.plist” couldn’t be opened because there is no such file." UserInfo={NSFilePath=Info.plist, NSUnderlyingError=0x7fd621d04140 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}})
Can someone help me?
Open your project directory and run from within
flutter create contagem_de_pessoas
This should create the missing info.plist

What causes this webpack code 2 error and how to solve it?

Cannot even build in sidekick after a simple change
I created a new Core/TS project in Sidekick, I built the app and developed some stuff, but later I changed the icon to a nicer one (which requires a new build, no HMR for this type of change obviously), now I cannot build my app (cloud build, because I don't have Android Studio).
I checked the /main/assets/app/ and the icons were successfully changed there and they were existed.
What is happening? How do I fix this big issue? My patience bottle with all these critical errors even after simple changes is getting emptied.
I also tried "removing .cloud and folder directories", and clicking "clean cloud processes", adding "clean" option, etc...
But none worked.
I also updated the webpack.config.js file, with node_modules.bin\update-ns-webpack --configs
The file got successfully updated, but still did not solve the problem and I still cannot build.
Still after many hours cannot cloud build my app in sidekick. I also tried tns platform remove android, tns install, etc, etc... none worked out.
this is the error message:
[00:00:18.521] [WARN] Executing webpack failed with exit code 2.
[00:00:18.681] [ERROR] clean-webpack-plugin: /mnt/storage/builds/_/af8fe992d35e76b54f5523261a83dac973ffc9ed/5.3.4/5.3.1/Spread/platforms/android/app/src/main/assets/app/**/* has been removed.
Executing webpack failed with exit code 2.
'Build failed with error code 2'.
[19-06-10 19:13:56.767] Couldn't enable debugging for EP7333JKFA, Error: Couldn't enable debugging for EP7333JKFA
at Errors.fail (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\common\errors.js:126:28)
at Errors.failWithoutHelp (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\common\errors.js:136:21)
at LiveSyncService.<anonymous> (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:253:30)
at Generator.next (<anonymous>)
at C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:13:71
at new Promise (<anonymous>)
at __awaiter (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:9:12)
at LiveSyncService.enableDebuggingCoreWithoutWaitingCurrentAction (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:250:16)
at LiveSyncService.enableDebuggingCoreWithoutWaitingCurrentAction (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\common\decorators.js:67:47)
at LiveSyncService.<anonymous> (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:290:25)
at Generator.next (<anonymous>)
at fulfilled (C:\Users\Bridge\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:10:58)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
OUTPUT 2
EDIT:
SOLVED
https://github.com/NativeScript/sidekick-feedback/issues/384#issuecomment-508028462
I know this isn't an answer, but it is happening to me, too. I am running Nativescript 5.4.1. I can build with webpack, but as soon as I try to run with AOT or Uglify, I can't build and the error message isn't very helpful.
Try to remove and add 'nativescript-dev-webpack'-plugin using nativescript-sidekick-GUI, this resolve my issue...

PhoneGap Build: Error: NOT_FOUND_ERR (missing files)

When I try to use my app from PhoneGap Build, it seems to be missing images. When I check in the Chrome web inspector, it's also missing script files. Here are the errors:
cordova.js:314 Uncaught Error: NOT_FOUND_ERR
at fileService.js:77
at fail (FileEntry.js:88)
at Object.callbackFromNative (cordova.js:295)
at <anonymous>:1:9
cordova.js:312 Error in Error callbackId: File410316782 : Error: NOT_FOUND_ERR
cordova.js:314 Uncaught Error: NOT_FOUND_ERR
at fileService.js:77
at fail (FileEntry.js:88)
at Object.callbackFromNative (cordova.js:295)
at <anonymous>:1:9
.png:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
I know I didn't fail to include this file, because it was working before.
Most issues like this, as well as "Upload Error [2]", can be solved in PhoneGap Build by deleting the app and re-uploading. Don't worry about losing anything, since all of your settings are in your config files. It seems that PhoneGap has a tendency to inadvertently retain or misplace files.
I tend to just delete my app and re-upload every time I need to run a build, so I don't have to waste time installing and opening the app, only to find out it's missing files.

Error at launch app

When I launch app sometimes I get this error and sometimes no:
2017-11-10 14:00:37.119701+0000 XXX[768:176399] [DYGLInitPlatform] connection to host has failed: Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"
2017-11-10 14:00:37.123363+0000 XXX[768:176399] aborting: platform initialization failed
(lldb)
What can cause this problem ?
There could be some corrupt files in your build folder.
Try running Clean (⌘+⇧+K) and Clean build folder... ( ⌘+⇧+⌥+K ) and rebuild your application.
In my case, the error was related to Launch Screen, most likely it was corrupt.
Deleting the launch screen under General Tab, fixed the issue.

.XIB / .NIB File doesn't load properly

My application got SIGABRT throwing error message:
"Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: ... "
Select the NIB file that is causing the SIGBART error, watch out on the file inspector and go to the "Target Membership" section. There you will see your project name with a check box at it's left. Check that box (mark as selected) and build & run your application. It should work fine.

Resources