Skip to content

hasanablak/reactnative-0.79.1-firebase-ios-push-notification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

YOUTUBE: https://www.youtube.com/watch?v=i681g7pldJw

1) APP OLUŞTUR

$ npx @react-native-community/cli@latest init ios_notification_test_9

$ cd ios_notification_test_9

$ cd ios && pod install && cd ..

2) APP TEST ET

$ npm start (bu terminal açık kalacak)

$ npx react-native run-ios (farklı bir terminalde)

3) PAKETLERİ KUR

$ npm install --save @react-native-firebase/app && npm install @react-native-firebase/messaging

4) xCode Capability

...xCode Aç (reactnative projenin ios klasörünü)...

1) Tab'a tıkla: "Signing & Capabilities"
2) Signing Bölümnden Team Seç
3) [+ Capability] Butonundan
	3.1) Push Notification
	3.2) Background Model
		3.2.1) Seç: Background Fetch
		3.2.2) Seç: Remote Notification
		3.2.3) Seç: Background Processing

5) FIREBASE'DEN IOS APP OLUSTUR VE .plist'i xCode ile içeriye al

1) Git => https://console.firebase.google.com 
2) Proje Seç veya Oluştur
3) [Ayarlar Simgesi ⚙️]'ne tıkla (sol üst)
4) "Your apps" bölümünden [Add App] butonuna tıkla ve IOS seç
5) Apple bundle ID: "xCode'daki Bundle Identifier gir" (Team altında, IOS içinde)
	5.1) App Nickname: "test.deneme.123"
	5.2) [Register app] butonuna tıkla
	5.3) [Download GoogleService-Info.plist] tıkla ve dosyayı indir
6) xCode'da Proje klasörüne GoogleService-Info.plist'i sürükle
	6.1) Checkbox işaretle: Copy items if needed 
	6.2) Radio seç: Create groups

6) APPLE DEVELOPER CONSOLE'DAN .p8 KEY ALARAK FIREBASE APP'E UPLOAD ET

1) Git => https://developer.apple.com/account/resources/authkeys/list
2) [Keys +] butonuna bas
3) Keyname: herhangi bir şey (5. Bölüm 5.1. adım) => "test.deneme.123" // Bu sana kalmış tabiki ama daha düzenli olması için hep aynı şeyi yazman iyi
4) Seç: Apple Push Notifications service (APNs)
	4.1) [Configure] Butonuna tıkla
	4.2) Seç: "Sandbox & Production"
	4.3) [Save] Butonuna tıkla
5) [Continue] Butonuna tıkla
6) [Register] Butonuna tıkla
7) [Download] Butonuna tıkla (.p8 dosyası download edilecek)
8) Kopyala: Key ID

-------------------

9) Git => https://console.firebase.google.com
10) Proje Seç veya Oluştur
11) [Ayarlar Simgesi ⚙️]'ne tıkla (sol üst)
12) Tab'a tıkla: "Cloud Messaging"
13) (Başlık)"Apple app configuration" Bölümünden bir önceki bölümde oluşturduğun App'e tıkla (5. Bölüm 5.1. adım) => "test.deneme.123"
14) (Hemen yanında) "APNs Authentication Key" => [Upload] butonuna tıkla
15) .p8 dosyasını seç (upload et) (7. adım)
16) Yapıştır: Key ID (8. adım)
17) Team ID: https://developer.apple.com/account => (ctrl + f && Team ID)

7) Certificates, Identifiers & Profiles => Profile'e app için profile ve test cihazı oluştur.

1) https://developer.apple.com/account/resources/profiles/list
2) [Profiles +] Butonuna tıkla
3) Seç: iOS App Development
4) [Continue] Butonuna tıkla
5) App ID: (5. Bölüm 5. adım) => "xCode'daki Bundle Identifier gir"
6) [Continue] Butonuna tıkla
7) Seç: Hangi sertifikayı kullanacaksan
8) [Continue] Butonuna tıkla
9) Seç: Hangi cihazı kullanacaksan (buradakilerin haricindeki cihazlarda da çalışacaktır)
10) [Continue] Butonuna tıkla
11) Provisioning Profile Name: (5. Bölüm 5.1. adım) => "test.deneme.123"
12) [Generate] Butonuna tıkla
13) [Download] Butonuna tıkla
14) Finder'dan indirilen öğeye çift tıklayarak aç xCode açılacaktır, burada ayarı set etmiş olur.

DOSYA İŞLEMLERİ

AppDeletage'i düzenle

PodFile'ı düzenle

TEST

cd ios && pod install --repo-update && cd ..
npx react-native run-ios

APP ÇALIŞIYOR MU? TEST ET

BASİT UI

sonra basit bir ui yapalım

App.jsx


BİLDİRİM İZİNLERİNİ AL BUTON İLE

FCM TOKEN AL CONSOLE'DAN

??

xcrun simctl push booted org.reactjs.native.example.ios-notification-test-3 your-notification.apns

About

React Native 0.79.1 Firebase Push Notification IOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors