Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all 16564 articles
Browse latest View live

Share content on LinkedIn for both android and ios using react native

$
0
0

I have an app built in react-native in which I have to share these data to LinkedIn

const options = {            title: 'Share via',            message: 'some message',            image:'images need to be shared' //may be multiple images            } 

I tried so many ways but not working. How can I do this?


Translate iOs dialogs in React Native app

$
0
0

I have a React Native app with a WebView that access to a web page with a file upload.The problem is that in iOs when the file upload input is touched it shows a modal with 3 different options that are displayed in English.

Modal image

The options are Take Photo or Video, Photo Library, and the last one is "Explorar" this one is being displayed in Spanish I don't know why.

I have looking for these texts or for any option to translate that but I didn't find anything in react documentation nor google.

I need to display these options in the same language (in Spanish), App Store is rejecting my app because of that

Thanks.

How to allow one device login in react-native?

$
0
0

I have implemented an APP that should allow one device one account which I will pass the uniqueId to Web API to be save alongside with user account row in SQL database. This validation happen on Splash and Authentication screen. The flow as below:

Logic Flow:

Device 1:

  1. Splash screen: retrieve value from AsyncStorage. If none, proceed to Authentication. If have value, go to #3
  2. Fill username and password and click Login.
  3. APP will fetch with web API together with userName, encrypted password and uniqueId retrieved from DeviceInfo module.
  4. If uniqueId column in SQL is empty, update the column. If have value, compare with uniqueId param. Condition: MATCH-return OK, NOT MATCH-return multiple login alert as exception.
  5. Fetch promise resolve OK:- Save encrypted userId and userName into AsyncStorage and go to Dashboard
  6. Fetch promise reject:- Show alert and stay at current screen.
  7. Notify Web API to clear the uniqueId column and AsyncStorage will clear the token value when user click Logout button

Device 2:

  1. Follow directly as Device 1

Situation:

User register 1 device or 1 account. So, if user have 2 device, they have to logout device 1 and login on device 2 to prevent the "Multiple Device Login" alert.

Problem:

As user reported Device 2 are lost or stolen. Our admin system will clear the uniqueId column for reported login information. But the real deal is(for Android, not familiar with ios yet); If user is not logout and press HOME button which fake the report, the APP will rest at task manager and use Device 1 to login. So at the end, 2 device can use 1 account.

Inquiry for the best solutions for the faced PROBLEM:

  1. Do I need to pass the uniqueId everytime the APP will fetch from the Web API to be validated when I will enquiry Web API for data?
  2. Is it practical to use Headless JS to check with Web API and inform the UI that multiple device alert and automatically logout the current device?
  3. Any other better ideas?

Most of tutorial or example show the validation as I doing now, but not found yet for situation on my problem.

UIDocumentInteractionController menu does not dismiss (React Native 0.61.5) iOS 13+

$
0
0

I have an issue with UIDocumentInteractionController which is used to open a PDF document.

The problem at this point is when user interacts with the menu my clicking on the Open in {app_name} action, the menu itself fails to close after user interaction leaving the menu open when user comes back to the app.

Dismissing the menu at this point requires user to tap twice on the X in order for menu to be dismissed.

I also tried to close the menu dynamically when app returns to active state by running dismissMenuAnimated on UIDocumentInteractionController instance but it does not work in this case, it does however dismiss the dialog if no interaction was made on it and the method is called.

One note, this issue is only present on never iOS version 13+. On older OS the menu is closed after interaction as expected.

We tried using this code other than all react-native stuff we tried:

    @property (nonatomic, strong) UIDocumentInteractionController *documentInteractionController;@property (atomic) CGRect rect;RCT_EXPORT_METHOD(openDocumentInteractionControllerWithFileURL:(NSURL *)fileURL){    if (!fileURL) {        // Return NO because there was no valid fileURL.        return;    }    UIViewController *rootCtrl = [[[[UIApplication sharedApplication] delegate] window] rootViewController];    // Open "Open in"-menu    self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:fileURL];    self.documentInteractionController.delegate = self;    BOOL sucess; // Sucess is true if it was possible to open the controller and there are apps available    sucess = [self.documentInteractionController presentOpenInMenuFromRect:self.rect inView:rootCtrl.view animated:YES];    if(!sucess){        // Inform app that the activity has finished        // Return NO because the service was canceled and did not finish because of an error.        // http://developer.apple.com/library/ios/#documentation/uikit/reference/UIActivity_Class/Reference/Reference.html    }}RCT_EXPORT_METHOD(dismissDocumentInteractionController){    // Hide menu    [self.documentInteractionController dismissMenuAnimated:YES];}

But without success.

IOS: Crashed: com.twitter.crashlytics.ios.exception - SIGABRT ABORT 0x00000001a43d2df0

$
0
0

I am facing a crash couple of times on firebase crashlytics, but I am unable to figure out which part of the code is creating the problem.

can anyone help me to resolve this issue, please find the given stacktrace image

enter image description here

Using base64 image strings for an app in React Native crashes

$
0
0

I am using base64 strings as image sources. when i open my app crashes immediately when loading any image with font. and at the same time the application closes me. this happens only on IOS on Android everything works fine.

I am using react-native version: "0.62.2"

For example:

<ImageBackground source={{"uri": 'base64encodedstring'}} />

How to store object or string in Objective-C and use it

$
0
0

I'm making a react native app and using a native module to get a "string" inside objective-c ios project.

RCT_EXPORT_MODULE();RCT_EXPORT_METHOD(getEmail:(NSString *)email){  RCTLogInfo(@"Getting %@", email);}

I don't know anything about the Objective-C part and I don't know how to store my "email" into something I can use and retrieve inside the AppDelegate.m

Example : [customFieldsDictionary setObject:email forKey:@"EMail"];

If someone can help or guide me through this, it would be awesome !

Thank you

React Native iOS - How to add Provisioning Profile to ipa submitted to Appstore

$
0
0

I have finished my React Native application and the iOS version works properly on a simulator when I run: npx react-native run-ios

I then the follow the instructions on the documentation to create a release:

https://reactnative.dev/docs/running-on-device#3-build-app-for-release

I then looked for the .app file created by running:

npx react-native run-ios --configuration Release

I then created a folder called Payload and put the .app file inside and zipped it up.After zipping the folder I changed the .zip extension to .ipa

When I submit the app to the Appstore I get the following errors:

ERROR ITMS-90174: "Missing Provisioning Profile - Apps must contain a provisioning profile in a file named embedded.mobileprovision."

How to add Provisioning Profile to iOS release build in React Native?


Implement multi party video/audio call in iOS app using SFU topology [closed]

$
0
0

I want to implement multi party video call in my iOS app using SFU topology not by peer to peer connection. Could you please suggest any tutorial, link to achieve the same. If there is no solution for iOS then please suggest for react native. Many many thanks in advance.

The react native firebase both onLink() and getInitialLink() have run only the ios device fires

$
0
0

I want to run only getInitialLink, but from a closed state After stepping on a dynamic link, both onLink and getInitialLink fire.

firebase.links().onLink((url) =>{ … }))firebase.links().getInitialLink((url) => { ... })

The IOS code for react native firebase can be found at https://v5.rnfirebase.io/docs/v5.x.x/links/ios to configure it It has been done.

When I check the operation on android devices, only getInitialLink runs as I expected. It works on the street.

By way of a supplement, We are using firebase's long dynamic link to get the query parameters passed in.

Does anyone know how to solve this problem?

library versions are below.

simulator ios: 13.3
device ios: 13.4.1
react: 16.8.6
react-native: ^0.60.6
react-native-firebase: ^5.6.0

Xcode Provisional Profile: doesn't include signing certificate "Apple Distribution...."

$
0
0

I have made 2 certificatesThe first one is of type "iOS Distribution".The second one is of type "Distribution".

As far as I can remember, one of the steps of creating the second one was to choose "Apple Distribution" in the checklist as one of the steps to creating the certificate.

I have generated a Provisional Profile and added it to my Xcode and I keep on getting this error: doesn't include signing certificate "Apple Distribution MYNAME (ABCDEF)"

So I go to the Provisional Profile section of developer.apple.com and edit the Profile to use the other certificate (therefore I have switched between the 2 certificates above for the same Profile) but I still keep on getting the same error: doesn't include signing certificate "Apple Distribution MYNAME (ABCDEF)"

Any ideas what I'm doing wrong and what I need to do?

FCM | Notification IOS

$
0
0

I am sending a remote notification with fcm in my react native project. For Android, the app works flawlessly when it's open or closed. Sounds are coming. For iOS, notifications are coming when the app is open and closed. However, when the application is open, the notification sounds, while the application is in the background, there is no sound. What is the reason?

//backend codenotification:{     title : 'x',     body : 'x',},apns: {     headers: {'apns-priority': '10',},payload: {     aps: {     sound: 'default',          }},},android: {     priority: 'high',     notification: {     sound: 'default',}}, token : token,};

Amazon Pay Integration with React Native

$
0
0

I need to integrate Amazon pay with react native app. But I could not find any solution. Is there any way to implement?

Update React Native from 0.59.10 to 0.61.5: XCode Build Error with .cpp files using OpenCV

$
0
0

I'm in the process of porting a React Native (0.59.10) to React Native 0.61.5, and am having troubles getting my custom OpenCV module (written in C++) to work. I'm getting multiple build errors in XCode (11.3.1) on Mac OSX Mojave (10.14.6 (18G103)), my guess is that the C++ environment in XCode is not set up properly, but then again I'm no expert on that and the error messages don't give me a good starting point to investigate.

I attached a screenshot of XCode's output ... XCode Build Error

..and the highlighted line #29 of the mentioned .pch file:Origin of the XCode build error

The first error message is:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:58:9: No member named 'clock_t' in the global namespace

Thanks!

Background processing being killed after seconds when minimizing a IOS app

$
0
0

Introduction

I made a VOIP dialer app with react-native. I'm using react-native-callkeep to show the user the default IOS call screen when receiving a call (On background and foreground), and i'm using react-native-push-notification to pop-up a local notification when a call is received too.

The problem

When i minimize the app (With the home button) and the app receives a call, he doesn't show neither the local notification or the call screen.but, if the call comes right after the minimize action, the screen and the notification shows up.

Tecnical explanation of what happens

Reading the logs, i see that IOS kills my app background processing when he prints the following line:

15:08:23.085311-0300 symptomsd com.vmaxtelecom.vmaxfone: Foreground: false

After this, nothing works on foreground neither background

Code explanation

Probably, the problem isn't with react-native-callkeep or with react-native-push-notification itself (Because they're work as intended). I think it's something with IOS Itself.

I found this thread wich defines exactly what happens to me.

My enabled capabilities

enter image description here

What i'm using

react-native version 0.61.5

Xcode version 11.5 (11E608c) on a MacOS 10.15.5 Catalina

IOS 13.4.1 on a Iphone 8

I'm using a release version of my project (The debug version does the same thing too)

My AppDelegate.m (Only the part after didFinishLaunchingWithOptions matters the most)

#import "AppDelegate.h"#import <React/RCTBridge.h>#import <React/RCTBundleURLProvider.h>#import <React/RCTRootView.h>#import <UserNotifications/UserNotifications.h>#import <RNCPushNotificationIOS.h>#import "RNCallKeep.h"#if DEBUG#import <FlipperKit/FlipperClient.h>#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>static void InitializeFlipper(UIApplication *application) {  FlipperClient *client = [FlipperClient sharedClient];  SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];  [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];  [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];  [client addPlugin:[FlipperKitReactPlugin new]];  [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];  [client start];}#endif@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{if ([UIApplication instancesRespondToSelector:@selector(registerUserNotificationSettings:)]){    [application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound categories:nil]];}#if DEBUG  InitializeFlipper(application);#endif  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge                                                   moduleName:@"VMAXFone"                                            initialProperties:nil];  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];  UIViewController *rootViewController = [UIViewController new];  rootViewController.view = rootView;  self.window.rootViewController = rootViewController;  [self.window makeKeyAndVisible];  UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];  center.delegate = self;  return YES;}-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler{  completionHandler(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge);}- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge{#if DEBUG  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];#else  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];#endif}- (BOOL)application:(UIApplication *)applicationcontinueUserActivity:(NSUserActivity *)userActivity  restorationHandler:(void(^)(NSArray * __nullable restorableObjects))restorationHandler{  return [RNCallKeep application:application           continueUserActivity:userActivity             restorationHandler:restorationHandler];}- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings{ [RNCPushNotificationIOS didRegisterUserNotificationSettings:notificationSettings];}- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{ [RNCPushNotificationIOS didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];}- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfofetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{  [RNCPushNotificationIOS didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];}- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error{ [RNCPushNotificationIOS didFailToRegisterForRemoteNotificationsWithError:error];}- (void)userNotificationCenter:(UNUserNotificationCenter *)centerdidReceiveNotificationResponse:(UNNotificationResponse *)response         withCompletionHandler:(void (^)(void))completionHandler{  [RNCPushNotificationIOS didReceiveNotificationResponse:response];  completionHandler();}- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification{ [RNCPushNotificationIOS didReceiveLocalNotification:notification];}@end

i dont think this is necessary but every information counts, so here's how i set-up react-native-callkeep (This function is called whe the app starts)

function initCallKitIntegration() {  return async function (dispatch, getState) {    let activeCall = null    const uuids = {}    const options = {      ios: {        appName: 'VMAX Fone',        imageName: 'phone_account_icon',        includesCallsInRecents: true,        supportsVideo: false      }    }    RNCallKeep.setup(options).then(accepted => {})    let incomingCall = null    const {endpoint} = getState().pjsip    const {appState} = getState().pjsip    endpoint.on("call_received", (call) => {      RNCallKeep.addEventListener('answerCall', () => {        //accept call here      })      RNCallKeep.addEventListener('endCall', () => {        //decline call here      })      RNCallKeep.addEventListener('didPerformDTMFAction', ({ digits, callUUID }) => {        //send dtmf digits here      })      RNCallKeep.addEventListener('didPerformSetMutedCallAction', ({ muted, callUUID }) => {        //mute and unmute call here      })      RNCallKeep.addEventListener('didToggleHoldCallAction', ({ hold, callUUID }) => {        //hold and unhold call here      })      endpoint.on("call_changed", (call) => {        //Change Call state here      })      endpoint.on("call_terminated", (call) => {        //endCall here        RNCallKeep.endCall(uuids[call.getCallId()])        delete uuids[call.getCallId()]      })      if (appState != 'active'){        RNCallKeep.displayIncomingCall(uuids[call.getCallId()], call.getRemoteNumber(), call.getRemoteNumber(), 'number', false)      }    })  }}

The logs

15:08:22 VMAXFone   Snapshotting a view (0x107269800, UIKeyboardImpl) that has not been rendered at least once requires afterScreenUpdates:YES.15:08:22 powerd Process runningboardd.28 Created SystemIsActive "application<com.vmaxtelecom.vmaxfone>28-56-1455:FBSceneSnapshotAction:sceneID:com.vmaxtelecom.vmaxfone-default" age:00:00:00  id:51539643472 [System: PrevIdle SysAct]15:08:22 SpringBoard    [sceneID:com.vmaxtelecom.vmaxfone-default] Sending scene action [SceneLifecycleEventOnly][0xa901] through WorkspaceServer: 0x2819e430015:08:22 backboardd Lcurrent=258.9457 Lr=2.8323 DR=91.4263 factor=0.084515:08:23 SpringBoard    Application process state changed for com.vmaxtelecom.vmaxfone: <SBApplicationProcessState: 0x280321380; pid: 476; taskState: Running; visibility: Background>15:08:23 SpringBoard    [com.vmaxtelecom.vmaxfone] Generating image data for snapshot: <XBApplicationSnapshot: 0x10033e300; identifier: 5EA00F96-F22F-4CDA-907D-4E24FCC9119C; contentType: SceneContent>15:08:23 backboardd Lcurrent=258.9457 Lr=2.8347 DR=91.3501 factor=0.084615:08:23 backboardd Lcurrent=258.9457 Lr=2.8370 DR=91.2738 factor=0.084715:08:23 SpringBoard    [com.vmaxtelecom.vmaxfone] Generating image data for snapshot: <XBApplicationSnapshot: 0x107662e60; identifier: DAA57ADA-4C38-4904-9139-C0782D20A8CA; variantID: downscaled; 15:08:23 SpringBoard    [com.vmaxtelecom.vmaxfone] Snapshot data for <XBApplicationSnapshot: 0x10033e300; …4E24FCC9119C> written to file: /private/var/mobile/Containers/Data/Application/E4F918EF-7431-4A05-9845-344EB8B058DD/Library/SplashBoard/Snapshots/sceneID:com.vmaxtelecom.vmaxfone-default/5EA00F96-F22F-4CDA-907D-4E24FCC9119C@2x.ktx15:08:23 backboardd Lcurrent=258.9457 Lr=2.8394 DR=91.1976 factor=0.084815:08:23 powerlogHelperd    {"msg":"CLCopyAppsUsingLocation", "event":"activity"}15:08:23 SpringBoard    [com.vmaxtelecom.vmaxfone] Snapshot data for <XBApplicationSnapshot: 0x107662e60; …C0782D20A8CA> written to file: /private/var/mobile/Containers/Data/Application/E4F918EF-7431-4A05-9845-344EB8B058DD/Library/SplashBoard/Snapshots/sceneID:com.vmaxtelecom.vmaxfone-default/downscaled/DAA57ADA-4C38-4904-9139-C0782D20A8CA@2x.ktx15:08:23 backboardd Lcurrent=258.9457 Lr=2.8418 DR=91.1215 factor=0.084915:08:23 backboardd Lcurrent=258.9457 Lr=2.8441 DR=91.0455 factor=0.085015:08:23 kernel memorystatus: set assertion priority(3) target VMAXFone:47615:08:23 runningboardd  [application<com.vmaxtelecom.vmaxfone>:476] Set jetsam priority to 3 [0] flag[1]15:08:23 runningboardd  [daemon<com.apple.SpringBoard>:56] Ignoring jetsam update because this process is not memory-managed15:08:23 runningboardd  Calculated state for application<com.vmaxtelecom.vmaxfone>: running-active (role: NonUserInteractive)15:08:23 runningboardd  [application<com.vmaxtelecom.vmaxfone>:476] Set darwin role to: NonUserInteractive15:08:23 runningboardd  [daemon<com.apple.SpringBoard>:56] Ignoring GPU update because this process is not GPU managed15:08:23 runningboardd  Calculated state for daemon<com.apple.SpringBoard>: running-active (role: UserInteractiveNonFocal)15:08:23 backboardd Lcurrent=258.9457 Lr=2.8465 DR=90.9694 factor=0.085115:08:23 mediaserverd   -CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Client com.vmaxtelecom.vmaxfone with pid '476' is now Background Running. Background entitlement: YES ActiveLongFormVideoSession: NO WhitelistedLongFormVideoApp NO15:08:23 mediaserverd   AudioSessionServerImp.cpp:3517:HandleAudioSessionApplicationStateChangeListener: { "action":"application_state_changed", "session":{"ID":"0x1f672","PID":476,"name":"VMAXFone"}, "details":{"new_state":"Background Running"} }15:08:23 mediaserverd   -CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Client (null) with pid '477' is now Background Running. Background entitlement: NO ActiveLongFormVideoSession: NO WhitelistedLongFormVideoApp NO15:08:23 mediaserverd   -CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Sending stop command to (null) with pid '477' because client is not allowed to play in the background AND does not continue AirPlaying video when device locks15:08:23 mediaserverd   -CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Client (null) with pid '405' is now Background Running. Background entitlement: YES ActiveLongFormVideoSession: NO WhitelistedLongFormVideoApp NO15:08:23 mediaserverd   SSServerImp.cpp:1179:SystemSoundServerKillSoundsForPID: pid 477(ContactViewViewS)15:08:23 SpringBoard    <private> setEnabledTopics <private> ignoredTopics <private> opportunisticTopics <private> sendToDaemon: YES15:08:23 apsd   Looking up connection on peer: 1b848900   found <private>15:08:23 apsd   <private>: connection set enabled topics from <private> to <private>15:08:23 apsd   <private>: connection set opportunistic topics from <private> to <private>15:08:23 apsd   <private> setEnabledTopics:<private> ignoredTopics:<private> opportunisticTopics:<private> forCategory UsesALS pretend NO change Downgraded15:08:23 apsd   <private> cancelling any pending filter updates15:08:23 apsd   <private> received topic update for Server pretend YES but there is no change.15:08:23 apsd   <private> no change detected between the new and old server filter - cancelling any pending updates15:08:23 apsd   <private> flush any pending work that ALS told us to queue for its managed topics <private>, processMode systemToken15:08:23 apsd   <private> flush any pending work that ALS told us to queue for its managed topics <private>, processMode userToken15:08:23 apsd   <private> received topic update for Normal pretend NO but there is no change.15:08:23 SpringBoard    <private> setEnabledTopics <private> ignoredTopics <private> opportunisticTopics <private> sendToDaemon: NO15:08:23 locationd  {"msg":"#CLIUA Marking change", "clientKey":"com.vmaxtelecom.vmaxfone", "reason":"Decaying in-use status from process state", "assertionLevel":3, "coming":1}15:08:23 locationd  {"msg":"#CLIUA Marking change", "clientKey":"com.vmaxtelecom.vmaxfone", "reason":"Process state from RunningBoard", "assertionLevel":4, "coming":0}15:08:23 backboardd Lcurrent=258.9457 Lr=2.8489 DR=90.8935 factor=0.085215:08:23 CommCenter #I BundleID: <private> is no longer a foreground app15:08:23 backboardd Lcurrent=258.9457 Lr=2.8513 DR=90.8176 factor=0.085315:08:23 symptomsd  NBSM Current state: idle, changed: systemForeground to 0 for net type 015:08:23 symptomsd  NBSM Eligible to go to active15:08:23 symptomsd  NBSM Current state: idle, changed: systemForeground to 0 for net type 0, eligible for active but constraints unsatisfied (0,0,0)15:08:23 symptomsd  NBSM Current state: idle, changed: systemForeground to 0 for net type 0, ineligible for positive as nil pred, wifi (0x0) cell (0x0)15:08:23 symptomsd  NBSM Current state: idle, changed: systemForeground to 0 for net type 0, ineligible for broken as nil pred, wifi (0x0) cell (0x0)15:08:23 symptomsd  com.vmaxtelecom.vmaxfone: Foreground: false

If there's a concept, or something that will make my app dont being killed by the IOS itself, i will be grateful of your help.Thanks in advance.

[EDIT]

So, i was looking and found some things that helped me:

  • My app, even with the background modes, needs to USE them to be a valid app to run on background and foreground.

  • The OS needs to recognize the app as a valid app to run the background mode (In my case, be a valid VOIP dialer).

What exactly was happening

My app processes wasn't recognized as any of the background modes i was using, so it was snapshotted, not killed. As viewed on the below image, taken from this article on the Apple website, there was no event to be handled, so it was snapshotted.

enter image description here

So now, my problem is how can i make my app be recognized as a valid VOIP dialer app by the Apple store itself.

This question is now ended.


Can we develop iOS mobile apps on linux?

$
0
0

I am trying to build cross-platform mobile applications using react native, and i tried to search for a way to develop/test iOS apps on linux and this question has been asked for quite some time now, but whatever i find was 7-10 years old and there answers too.I only have a laptop and i am a Linux user, and learning started learning React Native these days, but i found that for iOS apps i will need a Mac System. Is there a way for me to build iOS mobile apps on linux?, other than VMWARE/VirtualBox because i tried them and i am not able to make them work perfectly with MacOS.

Can't show Image by URI in React Native iOS Simulator

$
0
0

I'm using react-native 0.28.0

I'm trying to show an image on iPhone simulator according to this tutorial: http://www.appcoda.com/react-native-introduction/

var styles = StyleSheet.create({image: {    width: 107,    height: 165,    padding: 10  }}var imageURI = 'http://books.google.com/books/content?id=PCDengEACAAJ&printsec=frontcover&img=1&zoom=1&source=gbs_api'

Then in the render() function, I add this:

<Image style={styles.image} source={{uri:imageURI}} />

The space allocated for the image is there, but the image is not shown.


However, if I use local image instead, the image will be shown.

var Picture = require('./content.jpeg')

In render() function:

<Image source={Picture} style={styles.thumbnail} />

How can I show picture using URI as source?

React Native "undefined is not an Object"

$
0
0

Code:

import { ImageBackground,StyleSheet } from 'react-native';function WelcomeScreen(props) {    return (<ImageBackground        style={styles.background}         source={require("../assets/background.jpg")}></ImageBackground>    );  }const styles = StyleSheet.create({    background:{        flex: 1    }});export default WelcomeScreen;

Output:

Error message from android phone

Any ideas. I have been stuck for a few hours now, please help

How to correctly trim user input in React Native?

$
0
0

I have TextInput that receives onChangeText as a prop:

<TextInput  ...  value={this.state.myString}  onChangeText={this.updateInput.bind(this)}/>

And updateInput is represented as:

updateInput(newString) {  this.setState({ myString: newString.trim() });}

This works for Android only. Is there some way to trim user input on both platforms (iOS, Android)?

Update

Actually, string is processed as trimmed, but you can still type as many whitespaces as you want on iOS. And if you type two whitespaces in a row the dot appears like it would be the end of the sentence. This is undesirable behaviour, is there a way to avoid it?

Link with example video: https://streamable.com/dzl3c

React Native Text Input Auto-Fill Email issues

$
0
0

I am using the React Native Text Input, but I am having an issue with the iOS autofill feature when I am using the field for an email entry to sign up a user. I get autofill recommendations for names, state, city, country, but not email and I am unsure as to why. Here is the example of our text field/text input components.

Text Field Component

<TextInput {...props} style={props.tall ? styles.tallTextInputStyle : styles.textInputStyle} adjustsFontSizeToFit />

Form Input Component

<TextField    testID="emailInput"    placeholder="name@example.com"    error={errors.email || invalidEmail || duplicate}    validated={validated.email && !error}    keyboardType="email-address"    selectTextOnFocus    returnKeyType="done"    autoCapitalize={false}    onSubmitEditing={formSubmitted}    onChangeText={(val) => updateEmail(val.trim())}    autoCompleteType="email"    textContentType="emailAddress"/>

I have already added the Associated Domains to the Xcode project and this seemed to make no difference at all.

Any advice on the autofill issues I am going through would be greatly appreciated.

Viewing all 16564 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>