ting icon indicating copy to clipboard operation
ting copied to clipboard

Expo Support

Open Acetyld opened this issue 11 months ago • 19 comments

Hey man!

In the past we talked about this project, and how good it is =) Currently we are running a development expo project, and we tried to use burnt, but it was missing stuff ur library has, such as globaly config and ability to change colors etc..

Is this something u are willing to look into? To add expo support?

Acetyld avatar Feb 27 '24 15:02 Acetyld

Hey man!

In the past we talked about this project, and how good it is =) Currently we are running a development expo project, and we tried to use burnt, but it was missing stuff ur library has, such as globaly config and ability to change colors etc..

Is this something u are willing to look into? To add expo support?

Maybe I should reconsider this soon!! I'm seeing the growth of Expo. Wait for me. You can also develop it based on your knowledge through PR.

baronha avatar Feb 27 '24 18:02 baronha

image

Actually, it just works on Expo lol (not in Expo Go ofcourse) but a Development Build works fine 💪🏻

Reproduction Repo https://github.com/Acetyld/ting-expo

Acetyld avatar Feb 29 '24 08:02 Acetyld

image

Actually, it just works on Expo lol (not in Expo Go ofcourse) but a Development Build works fine 💪🏻

Reproduction Repo https://github.com/Acetyld/ting-expo

ahhaa. awesome!!! I've never used expo so I don't know exactly what the mechanism is. But it was amazing.

baronha avatar Feb 29 '24 08:02 baronha

Alright, i take above back lol

  1 | #import "Ting.h"
  2 | 
> 3 | #import <ting-Swift.h>
    |         ^ 'ting-Swift.h' file not found
  4 | 
  5 | @implementation Ting
  6 | 

In a real project its not auto linking the swift file ;p, pretty sure it is because of "useFramework! > static" This is needed for react-native-firebase.

I think best solution is to rewrite @baronha/ting to Expo Native Modules (its btw so much easier to write native modules in here lol with plain Kotlin/Swift) You should take a look into it, i made: https://github.com/Acetyld/expo-foreground-actions with it =)

And for your info Expo is not what is was, its now fully fletched without limits

Acetyld avatar Feb 29 '24 08:02 Acetyld

Alright, i take above back lol

  1 | #import "Ting.h"
  2 | 
> 3 | #import <ting-Swift.h>
    |         ^ 'ting-Swift.h' file not found
  4 | 
  5 | @implementation Ting
  6 | 

In a real project its not auto linking the swift file ;p

I also encountered the same problem when migrating to new arch in other projects (multiple picker ...)

baronha avatar Feb 29 '24 08:02 baronha

Alright, i take above back lol

  1 | #import "Ting.h"
  2 | 
> 3 | #import <ting-Swift.h>
    |         ^ 'ting-Swift.h' file not found
  4 | 
  5 | @implementation Ting
  6 | 

In a real project its not auto linking the swift file ;p

I also encountered the same problem when migrating to new arch in other projects (multiple picker ...)

See above updated comment

Acetyld avatar Feb 29 '24 08:02 Acetyld

I would really like this to work on Expo dev build.

KeaganStevens avatar Mar 27 '24 14:03 KeaganStevens

I would really like this to work on Expo dev build.

I would say, go for it =) I think burnt already has a good base, but it is missing features that Ting has. I would suggest creating the module with: https://docs.expo.dev/modules/native-module-tutorial/ , but thats up to u =)

Acetyld avatar Mar 27 '24 14:03 Acetyld

I would say, go for it =) I think burnt already has a good base, but it is missing features that Ting has. I would suggest creating the module with: https://docs.expo.dev/modules/native-module-tutorial/ , but thats up to u =)

Unfortunately I do not have a MacOS device and have no experience with Swift making this very difficult to accomplish. :(

KeaganStevens avatar Apr 02 '24 10:04 KeaganStevens

the package seem to be working with expo just fine, you have to build your own development client to use it. as it won't work in expo go.

a-eid avatar Apr 04 '24 09:04 a-eid

Does anyone here have experience building plugins for expo? It would be helpful if you guys had a PR for that.

baronha avatar Apr 04 '24 10:04 baronha

@baronha the package doesn't need a plugin, it works out of the box with expo.

a-eid avatar Apr 04 '24 10:04 a-eid

@a-eid problem is the "useFramework! > static"

Acetyld avatar Apr 04 '24 11:04 Acetyld

@Acetyld thank you for the clarification, you can use expo-build-properties to do that. it's also required by react-native-firebase packages.


[
        "expo-build-properties",
        {
          "ios": {
            "useFrameworks": "static"
          }
        }
 ]

Edit

this no longer seem to be working for me.

a-eid avatar Apr 04 '24 14:04 a-eid

Correct, but this causes ting package to not build On 4 Apr 2024 at 16:01 +0200, Ahmed Eid @.***>, wrote:

@Acetyldhttps://github.com/Acetyld thank you for the clarification, you can use expo-build-properties to do that. it's also required by react-native-firebase packages.

[ "expo-build-properties", { "ios": { "useFrameworks": "static" } } ]

— Reply to this email directly, view it on GitHubhttps://github.com/baronha/ting/issues/19#issuecomment-2037301265, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANEJI4RKYMGGP5ZISBNHLX3Y3VMMDAVCNFSM6AAAAABD4LJVNKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZXGMYDCMRWGU. You are receiving this because you were mentioned.Message ID: @.***>

Acetyld avatar Apr 04 '24 14:04 Acetyld

this solved the issue for me.

diff --git a/node_modules/@baronha/ting/ios/Ting.mm b/node_modules/@baronha/ting/ios/Ting.mm
index 2ae7778..22389c0 100644
--- a/node_modules/@baronha/ting/ios/Ting.mm
+++ b/node_modules/@baronha/ting/ios/Ting.mm
@@ -1,6 +1,7 @@
 #import "Ting.h"
 
-#import <ting-Swift.h>
+#import <Ting/Ting-Swift.h>
+
 
 @implementation Ting

a-eid avatar May 01 '24 17:05 a-eid

this solved the issue for me.

diff --git a/node_modules/@baronha/ting/ios/Ting.mm b/node_modules/@baronha/ting/ios/Ting.mm
index 2ae7778..22389c0 100644
--- a/node_modules/@baronha/ting/ios/Ting.mm
+++ b/node_modules/@baronha/ting/ios/Ting.mm
@@ -1,6 +1,7 @@
 #import "Ting.h"
 
-#import <ting-Swift.h>
+#import <Ting/Ting-Swift.h>
+
 
 @implementation Ting

@baronha could you look into this, if it is possible to fix this without breaking rn cli projects?

stichingsd-vitrion avatar May 02 '24 12:05 stichingsd-vitrion

Has anyone managed to get this working on Expo yet?

bojandurmic avatar Aug 29 '24 14:08 bojandurmic

Just found this today, as I couldn't customise colours with Burnt package, and the default styling was pretty hard to see on white bg apps.

It works fine for me with

"ios": { "useFrameworks": "static" }

Is this something I need to enable if not using firebase @Acetyld ?

(I have the google-services.json purely for android/expo push but I dont use firebase at all other than that)

samducker avatar Sep 01 '24 14:09 samducker