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

@react-native-firebase/messaging : TypeError: (0 , _messaging.default)(...).registerForRemoteNotifications is not a function

$
0
0

I am using @react-native-firebase/app": "^8.2.0", @react-native-firebase/messaging and react-native v0.61.0.also using @react-native-community/push-notification-ios": "^1.4.0" and "react-native-push-notification": "^4.0.0"

I have recently downgraded my react-native version from 0.63.0 to 0.61.0. In android everything works perfect but in ios simulator && real device messaging().registerForRemoteNotifications() throw error.

TypeError: (0 , _messaging.default)(...).registerForRemoteNotifications is not a functionTypeError: (0 , _messaging.default)(...).registerForRemoteNotifications is not a functionat App.componentDidMount

enter image description here

React-Native Info

System:OS: macOS 10.15.5CPU: (4) x64 Intel(R) Core(TM) i5-3470S CPU @ 2.90GHzMemory: 45.55 MB / 16.00 GBShell: 3.2.57 - /bin/bashBinaries:Node: 12.15.0 - /usr/local/bin/nodenpm: 6.13.4 - /usr/local/bin/npmWatchman: 4.9.0 - /usr/local/bin/watchmanSDKs:iOS SDK:Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2IDEs:Xcode: 11.5/11E608c - /usr/bin/xcodebuildnpmPackages:react: 16.9.0 => 16.9.0react-native: 0.61.0 => 0.61.0npmGlobalPackages:react-native-cli: 2.0.1

My App.js file

const hasPermissions = await messaging().hasPermission()    if (hasPermissions) {      await messaging().registerForRemoteNotifications()      await new Promise((resolve, reject) => setTimeout(() => resolve(), 1000))      token = await messaging().getToken()      let fctk = `getting fcm token ${token}`      Alert.alert(fctk)      console.log('FCM token', token)    } else {      const { status } = await requestNotifications(['alert', 'sound'])      if (status === 'granted') {        await messaging().registerForRemoteNotifications()        await new Promise((resolve, reject) => setTimeout(() => resolve(), 1000))        token = await messaging().getToken()        let fctk = `getting fcm token ${token}`        Alert.alert(fctk)        console.log('FCM token has been received', token)      }    }

my AppDelegate.m file

/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */#import <Firebase.h>#import "AppDelegate.h"#import <React/RCTBridge.h>#import <React/RCTBundleURLProvider.h>#import <React/RCTRootView.h>#import <UserNotifications/UserNotifications.h>#import <RNCPushNotificationIOS.h>#import <GoogleMaps/GoogleMaps.h>#import "RNSplashScreen.h"@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{  if ([FIRApp defaultApp] == nil) {    [FIRApp configure];  }   [GMSServices provideAPIKey:@"AIzaSyBALbK0zTosrX4J1sl9-k1wJt14Zuwk37M"];  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge                                                   moduleName:@"APPBusinessPlaza63"                                            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];  // Define UNUserNotificationCenter   UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];   center.delegate = self;  [RNSplashScreen show];  return YES;}- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge{#if DEBUG  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];#else  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];#endif}// Required to register for notifications- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings{ [RNCPushNotificationIOS didRegisterUserNotificationSettings:notificationSettings];}// Required for the register event.- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{ [RNCPushNotificationIOS didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];}// Required for the notification event. You must call the completion handler after handling the remote notification.- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfofetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{  [RNCPushNotificationIOS didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];}// Required for the registrationError event.- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error{ [RNCPushNotificationIOS didFailToRegisterForRemoteNotificationsWithError:error];}// IOS 10+ Required for localNotification event- (void)userNotificationCenter:(UNUserNotificationCenter *)centerdidReceiveNotificationResponse:(UNNotificationResponse *)response         withCompletionHandler:(void (^)(void))completionHandler{  [RNCPushNotificationIOS didReceiveNotificationResponse:response];  completionHandler();}// IOS 4-10 Required for the localNotification event.- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification{ [RNCPushNotificationIOS didReceiveLocalNotification:notification];}//Called when a notification is delivered to a foreground app.-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler{  completionHandler(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge);}@end
Info.plist file
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict><key>CFBundleDevelopmentRegion</key><string>en</string><key>CFBundleDisplayName</key><string>$(PRODUCT_NAME)</string><key>CFBundleExecutable</key><string>$(EXECUTABLE_NAME)</string><key>CFBundleIdentifier</key><string>$(PRODUCT_BUNDLE_IDENTIFIER)</string><key>CFBundleInfoDictionaryVersion</key><string>6.0</string><key>CFBundleName</key><string>$(PRODUCT_NAME)</string><key>CFBundlePackageType</key><string>APPL</string><key>CFBundleShortVersionString</key><string>1.0</string><key>CFBundleSignature</key><string>????</string><key>CFBundleURLTypes</key><array><dict><key>CFBundleTypeRole</key><string>Editor</string><key>CFBundleURLName</key><string>Bundle ID</string><key>CFBundleURLSchemes</key><array><string>com.webmascot.bp</string></array></dict><dict><key>CFBundleTypeRole</key><string>Editor</string><key>CFBundleURLSchemes</key><array><string>com.googleusercontent.apps.558394662083-po8okplh2v0cvc91r76rkau73tddkpj7</string></array></dict><dict><key>CFBundleTypeRole</key><string>Editor</string><key>CFBundleURLSchemes</key><array><string>fb469065720287765</string></array></dict></array><key>CFBundleVersion</key><string>1</string><key>LSRequiresIPhoneOS</key><true/><key>NSAppTransportSecurity</key><dict><key>NSAllowsArbitraryLoads</key><true/><key>NSExceptionDomains</key><dict><key>localhost</key><dict><key>NSExceptionAllowsInsecureHTTPLoads</key><true/></dict></dict></dict><key>NSLocationWhenInUseUsageDescription</key><string></string><key>UIAppFonts</key><array><string>Axiforma_Bold.ttf</string><string>Axiforma_Book.ttf</string><string>Axiforma_Light.ttf</string><string>Axiforma_Medium.ttf</string><string>Axiforma_Regular.ttf</string><string>MaterialIcons.ttf</string><string>MaterialCommunityIcons.ttf</string><string>Poppins-Black.ttf</string><string>Poppins-BlackItalic.ttf</string><string>Poppins-Bold.ttf</string><string>Poppins-BoldItalic.ttf</string><string>Poppins-ExtraBold.ttf</string><string>Poppins-ExtraBoldItalic.ttf</string><string>Poppins-ExtraLight.ttf</string><string>Poppins-ExtraLightItalic.ttf</string><string>Poppins-Italic.ttf</string><string>Poppins-Light.ttf</string><string>Poppins-LightItalic.ttf</string><string>Poppins-Medium.ttf</string><string>Poppins-MediumItalic.ttf</string><string>Poppins-Regular.ttf</string><string>Poppins-SemiBold.ttf</string><string>Poppins-SemiBoldItalic.ttf</string><string>Poppins-Thin.ttf</string><string>Poppins-ThinItalic.ttf</string><string>Roboto-Black.ttf</string><string>Roboto-BlackItalic.ttf</string><string>Roboto-Bold.ttf</string><string>Roboto-BoldItalic.ttf</string><string>Roboto-Italic.ttf</string><string>Roboto-Light.ttf</string><string>Roboto-Medium.ttf</string><string>Roboto-Regular.ttf</string><string>Roboto-Thin.ttf</string><string>Roboto_medium.ttf</string><string>Roboto.ttf</string><string>rubicon-icon-font.ttf</string></array><key>UIBackgroundModes</key><array><string>fetch</string><string>remote-notification</string></array><key>UILaunchStoryboardName</key><string>LaunchScreen</string><key>UIRequiredDeviceCapabilities</key><array><string>armv7</string></array><key>UISupportedInterfaceOrientations</key><array><string>UIInterfaceOrientationPortrait</string><string>UIInterfaceOrientationLandscapeLeft</string><string>UIInterfaceOrientationLandscapeRight</string></array><key>UIViewControllerBasedStatusBarAppearance</key><false/></dict></plist>

Do I need to submit the app again after changed app layout by using react native?

$
0
0

As I know react native is using js for development, so that do i need to resubmit the app to app store , after i changed the layout or function everytime, or it can change it like a webview without submit app?

Framework/Tool decision for mobile app with BT integration

$
0
0

I recently started a small project to build my own mobile app with bluetooth intgration.The design part is mostly done and now I want to start developing the app.

I have read up a bit and can't really decide which framework or tools to use. To make things clear: I'am pretty new to app development and just have experience in Javascript/Typescript and a little knowledge of react/react native.

Thats why my first approach was react native using Expo, since I can code everything in javascript there. However, I have now seen that the bluetooth api is not yet supported by Expo:https://docs.expo.io/introduction/why-not-expo/

However, I found an article with a guide that describes how to use the bluetooth api.https://blog.expo.io/so-you-want-to-build-a-bluetooth-app-with-react-native-and-expo-6ea6a31a151d.But I don't have any knowledge in the native programming languages yet. So im not sure how difficult it would be to eject the project and add the bluetooth api afterwards in native language.

Another possibility I discovered would be to use react with capacitor and this bluetooth plugin:https://capacitorjs.com/solution/reacthttps://www.npmjs.com/package/@capacitor-community/bluetooth-le

Besides react, Angular with Nativescript would of course be a good choice. But I haven't read much about that yet.

The ultimate goal for the project would be a combination of the mobile app which connects with my hardware via bluetooth and a web app which has nearly the same functions as the mobile app just without the bluetooth connection. But for now the mobile app is my first goal.

So i was hoping that you could give me an advice or starting point, which would be a suitable framework/tool for me to use?

Greetings and thanks in advance,Aiko

How to fix react-native not recording audio

$
0
0

Hello I use to react native audio recorder player package for record audio. No sound is recorded even though all permissions are granted. This is the code I'm using. I edited the androidmanifest.xml file. However, it still does not register. When the recording button is clicked the computer's microphone is active, but the application does not record sound

const audioRecorderPlayer = new AudioRecorderPlayer();export default class App extends Component {  constructor() {    super();    this.state = {      time: '00:00:00',      start: false,      url: '',      PlayTime: '00:00:00',      PlayDuration: '00:00:00',      Play: false    }  }  onStart = async  () => {    const result  = await audioRecorderPlayer.startRecorder();    audioRecorderPlayer.addRecordBackListener((e)=>{      this.setState({        start:true,        time:audioRecorderPlayer.mmssss(Math.floor(e.current_position))      })      return;    });  };  onStop = async () => {    const result = await audioRecorderPlayer.stopRecorder();    audioRecorderPlayer.removeRecordBackListener();    this.setState({url: result});  };  play = async () => {    const result = await audioRecorderPlayer.startPlayer();    audioRecorderPlayer.addPlayBackListener((e)=>{      if (e.current_position == e.duration){        audioRecorderPlayer.stopPlayer();      }      this.setState({        play:true,        playTime:audioRecorderPlayer.mmssss(Math.floor(e.current_position)),        playDuration:audioRecorderPlayer.mmssss(Math.floor(e.duration)),        });      return;    });  };  pause = async () => {    this.setState({      play: false    })    await audioRecorderPlayer.pausePlayer();  };  render() {    return (<View><Text>{this.state.time}</Text><TouchableOpacity          onPress={(!this.state.start) ? this.onStart : this.onStop}><Icon color={(!this.state.start) ? 'black' : 'red'} name={(!this.state.start) ? "microphone" : "microphone-slash"} size={50} /></TouchableOpacity>        {          this.state.url != ''&&<View><Text>{this.state.playTime} - { this.state.playDuration}</Text><TouchableOpacity onPress={(!this.state.play) ? this.play : this.pause}><Text>{!this.state.play ? 'Play ' : 'Stop'}</Text></TouchableOpacity></View>        }</View>    )  }}

Is there a way for a TextInput to behave like a button i.e. be able to be selected (onPress)?

$
0
0

I am making a react native health app in which the user can select tags to describe certain symptoms they are facing. I am trying to let the user create their own tags, at the moment the user can enter tags but cannot select them. Is there a way to allow them to select text inputs?

I have already tried wrapping touchable opacity around it but when I press the text input the cursor just focuses on the word (wanting me to edit the word).

I have also tried editable = {false} this removes the ability for the user to enter a text input completely. Is there a way to allow the user to input a value once and then disable the text input (non-editable)?

Or If I used Button instead of TextInput is there a way for the user to enter the title of the button so it can act as a tag?

Here is how I have allowed users to create text inputs

 addTextInput = (index) => {    let textInput = this.state.textInput;    textInput.push(<TextInput            style={styles.textInput}            onChangeText={(text) => this.addValues(text, index)}            editable={true}                      />    );    this.setState({ textInput });}removeTextInput = () => {    let textInput = this.state.textInput;    let inputData = this.state.inputData;    textInput.pop();    inputData.pop();    this.setState({ textInput, inputData });}

and this is what my current tags look like:

enter image description here

on the picture when the user presses the plus a new tag/TextInput is created, what I want is when the user presses it, it should be able to change color or the like.

here is the code for the plus button:

<View style={{    flexDirection: 'row',     flexGrow: '1',     flexWrap: 'wrap',     width: Responsive.width(300)}}>    {this.state.textInput.map((value) => {        return value    })}<TouchableWithoutFeedback onPress={() => {        this.addTextInput(this.state.textInput.length)    }}><Image            style={{ marginLeft: 8, width: 38, height: 38 }}            source={require('../../../assets/plusButton.png')}        /></TouchableWithoutFeedback>    {/* <Button title='Get Values' onPress={() => this.getValues()} /> */}</View><View style={styles.row}><View style={{ margin: 10, top: Responsive.height(75) }}><Button onPress={() => this.removeTextInput()}>Remove</Button></View></View>

Getting uniqueid of mobile device

$
0
0

My question is general and not specifically related to react native. I want to get the mobile device's (hardware's) unique id. I came across a react native library that can help me achieve this:https://github.com/react-native-device-info/react-native-device-info#getuniqueid

For android, it retrieves id of the form dd96dec43fb81c97.

My RELATED questions -

  1. How unique is this unique device id: dd96dec43fb81c97 for android ?
  2. Is it possible that 2 devices may have the same 'unique' device ids?
  3. After factory reset, does this value change on the device?
  4. Can the user of mobile device change this id themselves?
  5. What are the other options to get the unique device id? I think MAC address? But I think it is prohibited? Maybe MAC address is too private?

Although I have given reference to react native. But my question is general.

Generating UUID to effectively work as android device unique ID

$
0
0

I want to generate unique ID for every app installation/ download. This is to 'effectively' make the UUID effectively work as (unique) device id.

I came across an article. REFER POINT NUMBER 5 'Use UUID' IN BELOW LINK:

https://ssaurel.medium.com/how-to-retrieve-an-unique-id-to-identify-android-devices-6f99fd5369eb

In the 5th method (use UUID), it provides a sample code:

private static String uniqueID = null;private static final String PREF_UNIQUE_ID = "PREF_UNIQUE_ID";public synchronized static String id(Context context) {   if (uniqueID == null) {      SharedPreferences sharedPrefs = context.getSharedPreferences(         PREF_UNIQUE_ID, Context.MODE_PRIVATE);      uniqueID = sharedPrefs.getString(PREF_UNIQUE_ID, null);      if (uniqueID == null) {         uniqueID = UUID.randomUUID().toString();         Editor editor = sharedPrefs.edit();         editor.putString(PREF_UNIQUE_ID, uniqueID);         editor.commit();      }   }    return uniqueID;}

Looking at the code I understand that it is generating UUID using randomUUID(). I get the overall understanding of the above code.

MY QUESTIONS:

  1. As my requirement is (mentioned before) whenever a mobile user downloads my app. The app creates some kind of unique number (for identifying) the device. Can the above code serve the purpose?
  2. So lets say, a user downloads my app and the above sample code runs and the UUID is generated and stored in sharedpreferences (this is what is happening in the above code). Now later, the user clears app cache and data - will the generated UUID will remain intact (same) even after the user clears app's cache and app's data?

When i run command npx run ios in my react native project in macbook it give error saying internal/modules/cjs/loader.js : 883

$
0
0

my all projects of react native were working fine, but yesterday my friend gave me his react native project and when i tried to run it it asked me about xcode(which i dont remeber now) but i was unable to run that project....but now when i am trying to run my own previously working projects it gives me this error....i tried to remove node modulus and reinstall them i was still unable to resolve this issue....kindly help me plz.....

Starting: iosinternal/modules/cjs/loader.js:883throw err;^

Error: Cannot find module '/Users/dstuser/Documents/Learning/umarabbas/ios'    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)    at Function.Module._load (internal/modules/cjs/loader.js:725:27)    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)    at internal/main/run_main_module.js:17:47 {  code: 'MODULE_NOT_FOUND',  requireStack: []}dstuser@DSTUsers-MacBook umarabbas % cd iosdstuser@DSTUsers-MacBook ios % 

How do you debug React Native?

$
0
0

How does one debug their React code with React Native while the app is running in app simulator?

After expo eject, iOS app get in stuck at splash screen

$
0
0

I started a react-native app using expo, but due to some native functionality I had to eject my app from expo. Still I have the app.json file having a splash field in which I have defined some parameter. The point is that after ejecting my app, if I run react-native run-android it works fine, the app shows me a splash screen and then goes on without any problem. If I do the same on iOS, meaning that I run my app on my iPhone through xcode, the app starts but gets in stuck on the splash screen and it doesn't go on. The only log I can get on the metro terminal is:

No native splash screen registered for given view controller. Call 'SplashScreen.show' for given view controller first.

But I have no idea what that means, I don't even know whether it is related to my problem or not. Moreover, within the iOS folder, the .storyboard file only shows the splash screen and nothing else. Is that normal?

Please help me, I can't find any useful information online.

Why carplay and react native app crashes when click on app icon to open in carplay?

$
0
0

I am using react-native-carplay(^2.0.0) library for my react native app..

I made the setup as this library suggests and I run my App in different iOS simulators (iPhone 11, 12 in iOS versions 14.4, 14.2, 13.0).. I also tried to run the example that the library provides..

The problem always is that when I open carplay as an external window, I can see the icon of my app but when I click on it, the app close on iOS and carplay simulator without any errors..Also I saw that "CarPlay.connected" is false even if I can see the app's icon on carplay simulator..

Can anyone help..?Any ideas are welcome...

React-native draw curve bezier and adjust it by two points

$
0
0

I'm going to create a view which allow user to draw a sine curves and curves line get change accordingly by the two blue points when touch and move it.I have done on draw it but problem is that i cannot make the blue points to be able to drag/move around the view.Here's my code for now

import {Surface, Shape, Path} from '@react-native-community/art';const values = [30, 200, 0, 100];    const height = 500;    return (<View style={styles.container}><Surface height={'100%'} width={'100%'}><Shape d={spline(values, height)} strokeWidth={5} stroke="green"/><Shape d={points(values, height)} strokeWidth={10} stroke="blue"/></Surface></View>    );

And here's is what i wantenter image description here

Thanks for any help!!!

React Native 0.64 won't build iOS app after updating Xcode to 12.5 and iOS to 14.5

$
0
0

After upgrading Xcode to 12.5 and iOS to 14.5, I can't run the iOS app on a real device nor in the simulator.

After running npm run ios, I get this message:

The following build commands failed:        CompileC .../Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-Folly.build/Objects-normal/x86_64/DistributedMutex.o /Users/guilherme/Documents/Dood/ios/Pods/Flipper-Folly/folly/synchronization/DistributedMutex.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler

If I try to run the app on a real device using Xcode, this is the error I get (related to Flipper-Folly):

.../ios/Pods/Headers/Private/Flipper-Folly/folly/synchronization/DistributedMutex-inl.h:1051:5: 'atomic_notify_one<unsigned long>' is unavailable

Ideas? Thanks!

UPDATE:

React native has been updated to 0.64.1. You can now just change your react-native dependency to this version within your package.json file, then run npm install

A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.[ios, xcode]

$
0
0

I have android and ios app in react native which both uses webview to show webpage as application.Since I had to change package name to deploy it on google play since first one package name was occupied. I changed app.json file and all names in android folder and that's ok.

Now my question is what I need to change in my ios folder in order to my app work in xcode. I have this error.

Invariant Violation: "RestApp" has notbeen registered. This can happen if:

  • Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
  • A module failed to load due to an error and AppRegistry.registerComponent wasn't called.

This is my app.json file

{"name": "restapphhopp","displayName": "RestApphhopp"}

Index.js file

/** * @format */import {AppRegistry} from 'react-native';import App from './App';import {name as appName} from './app.json';AppRegistry.registerComponent(appName, () => App);

CameraRoll.save to album creating multiple albums

$
0
0

save(uri, {type: 'photo', album: 'Project'})

creating multiple albums with the same name and having one image per album.


How to save/download pictures in iphone photos

$
0
0

I'm using rn-fetch-blob

How to save/download pictures in an iPhone photos album???I want to create an app album in the Photos app and show all images in it as WhatsApp shows

ld: library not found for -lCocoaAsyncSocket

$
0
0

I'm using App Center to manage the build for iOS and the following is error I'm receiving in the build output:

    ld: library not found for -lCocoaAsyncSocketclang: error: linker command failed with exit code 1 (use -v to see invocation)** ARCHIVE FAILED **##[error]Error: /usr/bin/xcodebuild failed with return code: 65

I ran the build in Xcode and the archive was successful.

Any thoughts on why this fails in App Center ?

Change the display of Safari with ReactNativeKeycloak in-app browser options

$
0
0

I am trying to change the display of the following login with keycloak page.https://imgur.com/a/X18bmgCThis shows up with Safari when starting the app.

The problem I have is that the user has to scroll to see the " New user " part of my WebView. And this is a problem.I'd like to change the display of my WebView to make it look like this if possible :https://imgur.com/a/DYfpkRSHere I had to manually unzoom the page.

<ReactNativeKeycloakProvider      authClient={keycloak}      onEvent={onEvent}      initOptions={{        redirectUri: 'mobile://presentation',        inAppBrowserOptions: {          ephemeralWebSession: true,          modalEnabled: true,        },      }}>

This is the code displaying the Keycloak Login page in Safari ( https://github.com/react-keycloak/react-native-keycloak ).I've checked the different InAppBrowser options here : https://github.com/proyecto26/react-native-inappbrowser#ios-options

When changing the values of each of these options, I can see no differences on the iPhone I'm using. When I change 'ephemeralWebSession' from true to false, I can see the difference. But every other option makes no difference for me. I tried to change 'modalTransitionStyle', 'modalPresentationStyle', 'readerMode' and 'preferredBarTintColor' values, but nothing shows different on the WebView.

I don't understand what I should change to get my WebView to change aswell.

Xcode 12 - No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=arm64e armv7s arm64 arm7)

$
0
0

Since I update Xcode to Xcode 12, I've got this error when I build :

Check dependenciesNo architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=arm64e armv7s arm64 arm7)

I try a lot of things :

  • Uninstall/reinstall Pods via pod install
  • Build Active Architecture Only to No or to Yes for Debug and Release
  • Same thing for Pods project

Don't know what to do. This error come when I want to launch on iOS 14, but in iOS 13.7 this work perfectly without change.

-- EDIT --

I solve my problem by adding arm64 arm64e armv7 armv7s x86_64 to VALID_ARCHS, both in 'MyProject' and 'MyProjectTest', and it work now.

Accurate Indor Positioning System Mobile App

$
0
0

I am about to start building an app (for both iOS and Android) for Indoor Positioning System. The goal is that while in a building or warehouse, the app can accurately and effectively tell a user a viable path from source to destination. Right now I am studying the concepts and would very much appreciate any input from the community.

Here are my thoughts

  1. For App Building : react native or Flutter.
  2. For AR (in case the path needs to be shown in camera feed) : AR frameworks built in iOS and Android.

Now coming to the actual positioning task, I have read some documents in internet. There are certain technologies that can be applied to this.

  1. Wi-Fi Indoor Positioning Systems (low accuracy)
  2. Bluetooth Indoor Positioning (low power consumption)
  3. Pointr Deep Location.(closed source)

My understanding is that for accurate indoor positioning , beacons needs to be installed inside the building. I am asking the wonderful community to give me feedbacks regarding this. I am very new to this and would very much appreciate any input. Some open source projects with good documentation is highly welcome.

Thanks.

P.S. There are lots of opinion on ointernet on react-native vs Flutter. Which one is preferred?

Viewing all 17267 articles
Browse latest View live


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