PhoneGap + Sencha2 screen blank - ios

I've started a project in PhoneGap which will utilise Sencha Touch 2.
I tried to change the app name from 'app', since I've heard that conflicts with PhoneGap on Android devices. I altered app.js to main.js and that worked, but then I tried changing the Ext.application.name. All I got was a white screen after the loading splash, even with the old name Sencha. Debug console shows nothing at all happening, and the document <body> was empty. This happens with both sencha-touch-all.js and sencha-touch-all-debug.js. Test device is an iPad 1G running iOS 4.3.5.
Aside: To debug this issue, I set up weinre on my Mac and added the appropriate <script> tag to index.html. After making that change, though, the app didn't even launch. It hung on the PhoneGap splash png and I got this message from gdb-remote:
error: failed to launch '<app URI>' -- failed to send the qLaunchSuccess packet
The only reference to that message besides its definition in gdb-remote source that I can find is here, and it's unrelated. I managed to get the issue to go away by restarting the iPad and removing build intermediates.

SOLVED: The issue here was a missing value in the Ext.application definition (key with no associated value), so the whole app definition probably tanked as a result of that. Hence blank screen.

Related

App Stuck on Splash screen only on simulator

I am stuck on a white screen. This issues says to inspect I might be an JS error.
https://github.com/apache/cordova-ios/issues/938#issuecomment-656655260
Indeed I have one JS error which is not help full.
TypeError: 'application/octet-stream' is not a valid JavaScript MIME type.
I tried to build my APP on my ios device which works, only the simulator doesn't work.

ionic4-iOS white screen in iOS Simulator

I'm using XCode11 and ionic4. cordova version ios#5.0.0
project builds successfully using ionic cordova build ios
also successfull build in xcode
but when running on simulator, it end up showing white screen and nothing happens next. here is the console output showing the issues:
Log1
Log2
stuck on this for 4 days. checked so many suggestions on ionic blogs and nothing worked so far. I regret using ionic because its very buggy/unstable... please help
ISSUES:
-Failed to load webpage with error: the operation couldnt be completed(NSURLErrorDomain error -999)
-NSURL Connection finished with error -code -1100
-ERROR: HTTP Request(OSRequestRegisterUser) must contain an app_id parameter
-ERROR: Encountered error during push registration with OneSignal
in addition to the above errors, the iOS simulator hangs on "White Screen", the application does not load and nothing happens next.
Try this:
On your xcode, navigate to your plugin folder, locate a file named OneSignalPush.m
Inside, locate the initOneSignalObject,
add this: appId = "your-app-id-here";
right after this code:
[OneSignal setValue:#"Cordova" forKey:#"mSDKType"];
That did the trick for me.

Xcode 9 crashing when running split view app on iPhone

After working just fine on both iPhone and iPad for a month, my Xcode 9 app has consistently started crashing causing me the following fatal problem: When I build & run it on an iPhone (simulator or device) Xcode completes loading the app and then crashes too fast for me to copy/paste the error from the debugger. When I run on iPad it works fine leading me to believe this is a result of something related to the split master/detail view.
If I use either an exception breakpoint or an "all C++ exceptions" it will stop at the AppDelegate class and crash if I hit play. If I use only an "all Objective-C exceptions" it will crash as before.
In the debug view hierarchy I get the following errors as well:
Error: Unable to capture view hierarchy.
Details: Log Title: Data source expression execution failure.
Log Details: error evaluating expression “(id)
[[(Class)objc_getClass("DBGTargetHub") sharedHub]
performRequestWithRequestInBase64:#"...
Log Method: -[DBGDataSourceConnectionLibViewDebugger
_executeLLDBExpression:forRequest:onPotentialThread:iteration:]
_block_invoke_2
Method: -[DBGViewDebugger updateDebugHierarchy]_block_invoke_2
I have tested other apps and this issue is unique to the app I am working on. Any ideas or debugging tips for how to proceed? I might just have to redo this whole project again if I can't even find the root cause of this! Appreciate any help.
Quick solution: Reset Simulator Device
I managed to resolve the above issue thanks to some serious digging. First, to resolve the instantaneous crash problem, I set a breakpoint at every line in the app delegate. That allowed me to narrow the error to a memory handling problem. From there I started running the code on one of each device available, and realized the crash only occurred on devices I had used earlier in development. Resetting those devices solved the problem.
The core issue here is that when you clean/rebuild your xcode program, it updates the app code on the device, but not necessarily the data model information. So when I changed my data model by including new data and renaming old data it was not properly updated.

iOS app crashes immediately when debugging AppleWatch app on Simulator (not on device)

I've got an AppleWatch app that is working fine in Simulator and Device, but when I call openParentApplication, it appears that the parent app is crashing immediately because I see this in the console output:
The UIApplicationDelegate in the iPhone App never called reply()...
When I try to manually launch the parent iOS app in the Simulator it crashes there too immediately. I don't have time to attach the debugger (which is already attached to the AppleWatch app) to see what is crashing it. Note that the parent app runs fine when the AppleWatch is running and I'm using a real iPhone. I can also run the app fine on the Simulator when not debugging the AppleWatch app.
I've tried resetting the Simulator, but problem persists.
I'm just not sure how to debug this. Any help is appreciated.
Start an explicit background task in handleWatchKitRequest. Otherwise, your app gets killed before it reaches reply().
Refer to this post for a code example on how to create a background task.
In turns out that after commenting out all code in the parent app's didFinishLaunching and stripping almost all code out of the watch extension, the problem was indeed at a lower level.
The Simulator has a
Debug | Open System Log...
menu option that showed the crash logs, which contained:
Dyld Error Message: Library not loaded:
#rpath/MyCore.framework/MyCore Referenced from:
/Users/me/Library/Developer/CoreSimulator/Devices/A2061705-DDDF-477C-9AAA-E50GG43A6350/data/Containers/Bundle/Application/DEB7FB25-8233-4B9F-8DAB-9FF8AE42BF33/MyApp.app/MyApp
Reason: no suitable image found. Did find:
/Users/me/Library/Developer/CoreSimulator/Devices/A2061705-DDDF-477C-9AAA-E50FF43A6350/data/Containers/Bundle/Application/DEB7FB25-8553-4B9F-8DAB-9FF8AE95BF33/MyApp.app/Frameworks/MyCore.framework/MyCore:
mach-o, but wrong architecture
My Swift app has a few dependent Swift projects that are used by the app and extension. Getting the Swift frameworks to link has been a major pain. I've included the dependent frameworks (compiled in the same workspace) as embedded binaries. This works when running on the device, or on the Simulator, but not when running in this hybrid watch app + parent app Simulator context.
I changed the embedded binary references to point to the frameworks under ...DerivedData...Debug-iphonesimulator, as opposed to ...DerivedData...Debug-iphoneos, and the problem went away.
Still hoping the Swift framework story will improve.
Are you seeing an actual crash? That message has appeared for me plenty of times without the host app crashing.
99% of the time, that error appears because developers aren't opening a background task to complete their work in handleWatchKitRequest. Without the background task, the OS kills your app in the background before it has a chance to reply.

Testing IPad app with GDB hangs with black screen, fine on simulator

I have an app built on iOS 4.2, which works fine on the simulator. When I build and run the app on the device it hangs. The only way to wake it up is to kill GDB (i.e. hit the red stop sign). As long as GDB isn't running the app runs fine. I can open it up from the spring board and test as normal. Although if GDB is still running, and I launch the app from the spring board, the black screen just comes up again.
I don't have any breakpoints, and have Visible at Launch and Full Screen at Launch checked on my MainWindow.xib.
I get the same behaviour on my iPhone as well.
There's something about debugging on the device that just makes it just show a black screen. Although, I can see the status bar.
I've checked the GDB logs, but most just warn me about a device/SDK mismatch between some of the frameworks. Eg:
warning: UUID mismatch detected with
the loaded library - on disk is:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/PrivateFrameworks/AccountSettings.framework/AccountSettings
warning: UUID mismatch detected with
the loaded library - on disk is:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/PrivateFrameworks/MediaToolbox.framework/MediaToolbox
warning: UUID mismatch detected with
the loaded library - on disk is:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/PrivateFrameworks/MobileBluetooth.framework/MobileBluetooth
warning: UUID mismatch detected with
the loaded library - on disk is:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/PrivateFrameworks/VideoToolbox.framework/VideoToolbox
warning: UUID mismatch detected with
the loaded library - on disk is:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/PrivateFrameworks/CrashReporterSupport.framework/CrashReporterSupport
Has anyone else seen this behaviour?
I just updated my SDK and the device with the latest versions from Apple and it seemed to fix this issue.

Resources